Sdm0 commited on
Commit
fbca6b7
Β·
verified Β·
1 Parent(s): 972000a

Sync from GitHub via hub-sync

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -322,6 +322,7 @@ def run_smoke(progress=gr.Progress()):
322
  list(graph.stream(SYNTHETIC_STATE, config))
323
  except Exception as exc:
324
  log_error_to_backends(exc, context={"source": "gradio_ui", "phase": "smoke_stream"})
 
325
  raise
326
  state = graph.get_state(config)
327
  tasks = state.tasks
@@ -474,7 +475,12 @@ JS_TOGGLE_THEME = """
474
  # ── Initialise observability backends ────────────────────────────────
475
  _init_observability_ui()
476
 
477
- with gr.Blocks(css=CSS, title="OpenCodeReview", theme=gr.themes.Soft()) as demo:
 
 
 
 
 
478
  demo.load(js=JS_RESTORE_THEME)
479
 
480
  with gr.Row():
@@ -717,6 +723,8 @@ def main() -> None:
717
  server_name="0.0.0.0",
718
  server_port=port,
719
  share=False,
 
 
720
  )
721
 
722
 
 
322
  list(graph.stream(SYNTHETIC_STATE, config))
323
  except Exception as exc:
324
  log_error_to_backends(exc, context={"source": "gradio_ui", "phase": "smoke_stream"})
325
+ logger.exception("Smoke test failed: %s", exc)
326
  raise
327
  state = graph.get_state(config)
328
  tasks = state.tasks
 
475
  # ── Initialise observability backends ────────────────────────────────
476
  _init_observability_ui()
477
 
478
+ # Gradio 6.0+ moved css/theme params from Blocks() to launch().
479
+ # Keep them as module-level vars for launch(); don't pass to Blocks().
480
+ _css = CSS
481
+ _theme = gr.themes.Soft()
482
+
483
+ with gr.Blocks(title="OpenCodeReview") as demo:
484
  demo.load(js=JS_RESTORE_THEME)
485
 
486
  with gr.Row():
 
723
  server_name="0.0.0.0",
724
  server_port=port,
725
  share=False,
726
+ css=_css,
727
+ theme=_theme,
728
  )
729
 
730