tasal9 commited on
Commit
7465346
Β·
verified Β·
1 Parent(s): 79ecc0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -63,14 +63,14 @@ class TrainingState:
63
  self.status = "idle"
64
  self.progress = 100
65
 
66
- def get_status(self):
67
- m = {
68
- "idle": "βœ… Ready",
69
- "training": "πŸ‹οΈ Training",
70
- "fine-tuning": "🎯 Fine-tuning"
71
- }
72
- return m.get(self.status, "❓ Unknown") + (f" - {self.progress}%" if self.status != "idle" else "")
73
-
74
  state = TrainingState()
75
 
76
  def test_model(text):
 
63
  self.status = "idle"
64
  self.progress = 100
65
 
66
+ with gr.Tab("πŸ“Š Status"):
67
+ with gr.Row():
68
+ status_box = gr.Textbox(label="Current Status", interactive=False)
69
+ progress_bar = gr.Slider(minimum=0, maximum=1, value=0, step=0.01, interactive=False, label="Progress")
70
+ log_output = gr.Textbox(label="Logs", lines=10, interactive=False)
71
+ refresh_btn = gr.Button("πŸ”„ Refresh Status")
72
+ refresh_btn.click(get_current_status, outputs=[status_box, progress_bar, log_output])
73
+
74
  state = TrainingState()
75
 
76
  def test_model(text):