Pathikreet commited on
Commit
49d99dc
·
verified ·
1 Parent(s): 3eb85d0

Fix restart loop: variant=secondary, theme back in Blocks()

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -465,7 +465,7 @@ MODELS = [
465
  'meta-llama/Meta-Llama-3-8B-Instruct',
466
  ]
467
 
468
- with gr.Blocks(title='AP Commander Training') as demo:
469
 
470
  gr.HTML("""
471
  <div style="background:#0d1117;padding:18px 24px;border-radius:8px;
@@ -494,7 +494,7 @@ with gr.Blocks(title='AP Commander Training') as demo:
494
 
495
  with gr.Row():
496
  start_btn = gr.Button('🚀 Start Training', variant='primary', size='lg', scale=4)
497
- stop_btn = gr.Button('🛑 Stop & Save Plots', variant='stop', size='lg', scale=1)
498
  stop_status = gr.Textbox(label='', visible=True, interactive=False, max_lines=2,
499
  placeholder='Stop status will appear here…')
500
 
@@ -607,4 +607,4 @@ with gr.Blocks(title='AP Commander Training') as demo:
607
  timer = gr.Timer(15)
608
  timer.tick(fn=_refresh, outputs=_plot_outputs)
609
 
610
- demo.launch(server_name='0.0.0.0', server_port=7860, theme=gr.themes.Base())
 
465
  'meta-llama/Meta-Llama-3-8B-Instruct',
466
  ]
467
 
468
+ with gr.Blocks(title='AP Commander Training', theme=gr.themes.Base()) as demo:
469
 
470
  gr.HTML("""
471
  <div style="background:#0d1117;padding:18px 24px;border-radius:8px;
 
494
 
495
  with gr.Row():
496
  start_btn = gr.Button('🚀 Start Training', variant='primary', size='lg', scale=4)
497
+ stop_btn = gr.Button('🛑 Stop & Save Plots', variant='secondary', size='lg', scale=1)
498
  stop_status = gr.Textbox(label='', visible=True, interactive=False, max_lines=2,
499
  placeholder='Stop status will appear here…')
500
 
 
607
  timer = gr.Timer(15)
608
  timer.tick(fn=_refresh, outputs=_plot_outputs)
609
 
610
+ demo.launch(server_name='0.0.0.0', server_port=7860)