CodeChamp95 commited on
Commit
df5ae80
Β·
verified Β·
1 Parent(s): f235ad1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -477,7 +477,7 @@ def build_app():
477
  )
478
 
479
  # ── Send message to agent ─────────────────────────────────────────
480
- def on_send(message: str, history: list, csv_path, charts_state, downloads_state):
481
  """Stream agent responses and update all UI elements."""
482
  if not message.strip():
483
  yield history, "", phase_html("idle"), [], None, charts_state, downloads_state
@@ -580,7 +580,7 @@ def build_app():
580
  )
581
 
582
  # ── Chart selector ────────────────────────────────────────────────
583
- def on_chart_change(chart_name: str, charts_state: dict):
584
  src = (charts_state or {}).get(chart_name, "")
585
  return make_chart_html(src)
586
 
@@ -591,7 +591,7 @@ def build_app():
591
  )
592
 
593
  # ── Update chart dropdown when charts_state changes ──────────────
594
- def on_charts_state_change(charts_state: dict):
595
  choices = list((charts_state or {}).keys())
596
  if choices:
597
  return gr.update(choices=choices, value=choices[0])
@@ -617,6 +617,6 @@ app = build_app()
617
  app.launch(
618
  server_name="0.0.0.0",
619
  server_port=7860,
620
- share=True,
621
  show_error=True
622
  )
 
477
  )
478
 
479
  # ── Send message to agent ─────────────────────────────────────────
480
+ def on_send(message, history, csv_path, charts_state, downloads_state):
481
  """Stream agent responses and update all UI elements."""
482
  if not message.strip():
483
  yield history, "", phase_html("idle"), [], None, charts_state, downloads_state
 
580
  )
581
 
582
  # ── Chart selector ────────────────────────────────────────────────
583
+ def on_chart_change(chart_name, charts_state):
584
  src = (charts_state or {}).get(chart_name, "")
585
  return make_chart_html(src)
586
 
 
591
  )
592
 
593
  # ── Update chart dropdown when charts_state changes ──────────────
594
+ def on_charts_state_change(charts_state):
595
  choices = list((charts_state or {}).keys())
596
  if choices:
597
  return gr.update(choices=choices, value=choices[0])
 
617
  app.launch(
618
  server_name="0.0.0.0",
619
  server_port=7860,
620
+ share=False,
621
  show_error=True
622
  )