geronimo-pericoli commited on
Commit
1b81462
1 Parent(s): 2eb120b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -535,6 +535,10 @@ with gr.Blocks(theme='sudeepshouche/minimalist', css=css) as demo:
535
  def get_ref():
536
  return {mkdn: gr.Markdown(result_metadata), texts: gr.HTML(str(result_texts))}
537
 
 
 
 
 
538
  def get_logs(selected_month):
539
  df = load_audit_trail(selected_month)
540
  return df
@@ -749,7 +753,7 @@ with gr.Blocks(theme='sudeepshouche/minimalist', css=css) as demo:
749
  btn_ref.click(fn=get_ref, outputs=[mkdn, texts])
750
  btn_eval.click(fn=get_evals, outputs=[evals, eval_accord])
751
  btn_send.click(respond, [pregunta, chatbot], [pregunta, chatbot])
752
- btn_graph.click(draw_graph, outputs=[grafo])
753
 
754
  clear.click(refresh, inputs=[chatbot], outputs=[chatbot])
755
  chatbot.like(print_like_dislike, None, None)
 
535
  def get_ref():
536
  return {mkdn: gr.Markdown(result_metadata), texts: gr.HTML(str(result_texts))}
537
 
538
+ def get_graph():
539
+ iframe_grafo = draw_graph()
540
+ return {grafo: gr.HTML(iframe_grafo)}
541
+
542
  def get_logs(selected_month):
543
  df = load_audit_trail(selected_month)
544
  return df
 
753
  btn_ref.click(fn=get_ref, outputs=[mkdn, texts])
754
  btn_eval.click(fn=get_evals, outputs=[evals, eval_accord])
755
  btn_send.click(respond, [pregunta, chatbot], [pregunta, chatbot])
756
+ btn_graph.click(fn=get_graph, outputs=[grafo])
757
 
758
  clear.click(refresh, inputs=[chatbot], outputs=[chatbot])
759
  chatbot.like(print_like_dislike, None, None)