Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,14 +63,14 @@ class TrainingState:
|
|
| 63 |
self.status = "idle"
|
| 64 |
self.progress = 100
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 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):
|