sxandie commited on
Commit
d68bee9
·
1 Parent(s): 97029d8

fix: resolve deprecation and block css warnings for Gradio 6 compat

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1470,7 +1470,7 @@ Please write a cohesive first-person adventure story of my trek."""
1470
  return story, story_file
1471
 
1472
  # --- Gradio Blocks UI ---
1473
- with gr.Blocks(css="assets/custom.css", title="Trailhead — Tactical Trail Computer") as demo:
1474
  route_state = gr.State(None)
1475
  null_state = gr.State(None)
1476
  current_point_idx = gr.State(0)
@@ -1590,7 +1590,7 @@ with gr.Blocks(css="assets/custom.css", title="Trailhead — Tactical Trail Comp
1590
  checkpoint_table = gr.DataFrame(
1591
  headers=["Checkpoint", "Coordinates", "Cumulative Distance", "Altitude"],
1592
  datatype=["str", "str", "str", "str"],
1593
- col_count=(4, "fixed")
1594
  )
1595
 
1596
  with gr.TabItem("💬 Wilderness Guide & First-Aid AI"):
@@ -1809,8 +1809,8 @@ with gr.Blocks(css="assets/custom.css", title="Trailhead — Tactical Trail Comp
1809
  if __name__ == "__main__":
1810
  port = int(os.environ.get("PORT", 7860))
1811
  try:
1812
- demo.launch(server_name="0.0.0.0", server_port=port)
1813
  except OSError:
1814
  print(f"[app] Port {port} is busy. Falling back to automatic port selection...")
1815
- demo.launch(server_name="127.0.0.1")
1816
 
 
1470
  return story, story_file
1471
 
1472
  # --- Gradio Blocks UI ---
1473
+ with gr.Blocks(title="Trailhead — Tactical Trail Computer") as demo:
1474
  route_state = gr.State(None)
1475
  null_state = gr.State(None)
1476
  current_point_idx = gr.State(0)
 
1590
  checkpoint_table = gr.DataFrame(
1591
  headers=["Checkpoint", "Coordinates", "Cumulative Distance", "Altitude"],
1592
  datatype=["str", "str", "str", "str"],
1593
+ column_count=(4, "fixed")
1594
  )
1595
 
1596
  with gr.TabItem("💬 Wilderness Guide & First-Aid AI"):
 
1809
  if __name__ == "__main__":
1810
  port = int(os.environ.get("PORT", 7860))
1811
  try:
1812
+ demo.launch(server_name="0.0.0.0", server_port=port, css="assets/custom.css")
1813
  except OSError:
1814
  print(f"[app] Port {port} is busy. Falling back to automatic port selection...")
1815
+ demo.launch(server_name="127.0.0.1", css="assets/custom.css")
1816