Mike0021 commited on
Commit
deedb5b
·
verified ·
1 Parent(s): fdb8a48

Simplify Gradio launch path

Browse files
Files changed (1) hide show
  1. app.py +8 -11
app.py CHANGED
@@ -1321,8 +1321,14 @@ def build_app() -> gr.Blocks:
1321
  choices = _session_choices(live=False)
1322
  default = None
1323
  initial_summary, initial_transcript, initial_page_info, initial_page = _initial_view(choices)
 
 
 
 
 
 
1324
 
1325
- with gr.Blocks(title=APP_TITLE, fill_width=True) as demo:
1326
  with gr.Row(elem_id="ct-app", elem_classes=["ct-shell"]):
1327
  with gr.Column(elem_classes=["ct-sidebar"], scale=0):
1328
  gr.HTML(
@@ -1416,13 +1422,4 @@ print("codex-traces startup: demo ready", flush=True)
1416
 
1417
  if __name__ == "__main__":
1418
  print("codex-traces startup: launching", flush=True)
1419
- demo.launch(
1420
- theme=gr.themes.Base(
1421
- primary_hue="blue",
1422
- secondary_hue="cyan",
1423
- neutral_hue="slate",
1424
- radius_size="sm",
1425
- ),
1426
- css=CUSTOM_CSS,
1427
- show_error=True,
1428
- )
 
1321
  choices = _session_choices(live=False)
1322
  default = None
1323
  initial_summary, initial_transcript, initial_page_info, initial_page = _initial_view(choices)
1324
+ theme = gr.themes.Base(
1325
+ primary_hue="blue",
1326
+ secondary_hue="cyan",
1327
+ neutral_hue="slate",
1328
+ radius_size="sm",
1329
+ )
1330
 
1331
+ with gr.Blocks(title=APP_TITLE, fill_width=True, theme=theme, css=CUSTOM_CSS) as demo:
1332
  with gr.Row(elem_id="ct-app", elem_classes=["ct-shell"]):
1333
  with gr.Column(elem_classes=["ct-sidebar"], scale=0):
1334
  gr.HTML(
 
1422
 
1423
  if __name__ == "__main__":
1424
  print("codex-traces startup: launching", flush=True)
1425
+ demo.launch(show_error=True)