kevinhug commited on
Commit
73b7507
·
1 Parent(s): 2ea584d

image correct

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. knowledge.py +1 -1
app.py CHANGED
@@ -275,14 +275,14 @@ Customer: "No, thank you."
275
  )
276
  btn_recommend = gr.Button("Graph It!")
277
  btn_clear = gr.ClearButton(components=[out_product])
278
- btn_recommend.click(fn=graph, inputs=in_verbatim, outputs=out_product)
279
 
280
 
281
  gr.Markdown("""
282
  Example of Customer Profile in Graph
283
  =================
284
- ![Customer Needs and Pain Points](./knowledge_graph1.png)
285
- ![Accumulated Interaction for the same Customer Needs and Pain Points](./knowledge_graph2.png)
286
 
287
  Benefits of a Knowledge Graph
288
  ============
@@ -447,7 +447,7 @@ Customer: "No, thank you."
447
  gr.Markdown("""
448
  Example of Call Resolution
449
  ===============
450
- ![Resolution for Clear Picture about Customer Issue](./entity.png)
451
 
452
  Companies like RBC, Comcast, or BMO often face a recurring challenge: long, complex customer service calls filled with vague product references, overlapping account details, and unstructured issue descriptions. This makes it difficult for support teams and analytics engines to extract clear insights or resolve recurring pain points across accounts and products.
453
 
 
275
  )
276
  btn_recommend = gr.Button("Graph It!")
277
  btn_clear = gr.ClearButton(components=[out_product])
278
+ btn_recommend.click(fn=graph, inputs=[in_verbatim, out_product], outputs=out_product)
279
 
280
 
281
  gr.Markdown("""
282
  Example of Customer Profile in Graph
283
  =================
284
+ ![Customer Needs and Pain Points](/file=knowledge_graph1.png)
285
+ ![Accumulated Interaction for the same Customer Needs and Pain Points](/file=knowledge_graph2.png)
286
 
287
  Benefits of a Knowledge Graph
288
  ============
 
447
  gr.Markdown("""
448
  Example of Call Resolution
449
  ===============
450
+ ![Resolution for Clear Picture about Customer Issue](/file=entity.png)
451
 
452
  Companies like RBC, Comcast, or BMO often face a recurring challenge: long, complex customer service calls filled with vague product references, overlapping account details, and unstructured issue descriptions. This makes it difficult for support teams and analytics engines to extract clear insights or resolve recurring pain points across accounts and products.
453
 
knowledge.py CHANGED
@@ -155,7 +155,7 @@ def expandIssue(input) -> Iterable[Subissue]:
155
 
156
  def graph(query, queryx):
157
  #queryx = expandIssue(query)
158
- if queryx is None:
159
  graph = generate_graph(query)
160
  else:
161
  graph = generate_graph(query, KnowledgeGraph.model_validate_json(queryx))
 
155
 
156
  def graph(query, queryx):
157
  #queryx = expandIssue(query)
158
+ if queryx.strip() == "":
159
  graph = generate_graph(query)
160
  else:
161
  graph = generate_graph(query, KnowledgeGraph.model_validate_json(queryx))