singhn9 commited on
Commit
9370b77
·
verified ·
1 Parent(s): c89dac9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -475,6 +475,9 @@ def make_arc_html(nodes, node_type, buys, sells, transfers, loops):
475
 
476
  initial_html = make_arc_html(NODES, NODE_TYPE, BUYS, SELLS, TRANSFERS, LOOPS)
477
 
 
 
 
478
  # ---------------------------
479
  # Gradio UI
480
  # ---------------------------
@@ -488,16 +491,17 @@ with gr.Blocks(css=responsive_css, title="MF Churn — Semi-layer Arc Diagram (L
488
  gr.HTML(initial_html)
489
 
490
  gr.Markdown("### Inspect Company / AMC")
 
491
  select_company = gr.Dropdown(choices=COMPANIES, label="Select company")
492
- company_plot = gr.Plotly()
493
  company_table = gr.DataFrame()
 
494
  select_amc = gr.Dropdown(choices=AMCS, label="Select AMC")
495
- amc_plot = gr.Plotly()
496
  amc_table = gr.DataFrame()
497
 
498
  def on_company(c):
499
  fig, df = company_trade_summary(c)
500
- # Ensure DataFrame is returned as-is for gr.DataFrame
501
  return fig, df
502
 
503
  def on_amc(a):
 
475
 
476
  initial_html = make_arc_html(NODES, NODE_TYPE, BUYS, SELLS, TRANSFERS, LOOPS)
477
 
478
+ # ---------------------------
479
+ # Gradio UI
480
+ # ---------------------------
481
  # ---------------------------
482
  # Gradio UI
483
  # ---------------------------
 
491
  gr.HTML(initial_html)
492
 
493
  gr.Markdown("### Inspect Company / AMC")
494
+
495
  select_company = gr.Dropdown(choices=COMPANIES, label="Select company")
496
+ company_plot = gr.Plot()
497
  company_table = gr.DataFrame()
498
+
499
  select_amc = gr.Dropdown(choices=AMCS, label="Select AMC")
500
+ amc_plot = gr.Plot()
501
  amc_table = gr.DataFrame()
502
 
503
  def on_company(c):
504
  fig, df = company_trade_summary(c)
 
505
  return fig, df
506
 
507
  def on_amc(a):