Update app.py
Browse files
app.py
CHANGED
@@ -47,14 +47,14 @@ def run():
|
|
47 |
gr.Markdown(f"Randomization: 10.0")
|
48 |
gr.Markdown(f"Subset: frac-1over4")
|
49 |
status_box = gr.Textbox()
|
50 |
-
space_variables = API.get_space_variables(repo_id=experiment_repo)
|
51 |
-
if 'STATUS' not in space_variables or space_variables['STATUS'].value != 'TRAINING':
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
else:
|
57 |
-
|
58 |
app.launch(server_name="0.0.0.0", server_port=7860)
|
59 |
|
60 |
if __name__ == '__main__':
|
|
|
47 |
gr.Markdown(f"Randomization: 10.0")
|
48 |
gr.Markdown(f"Subset: frac-1over4")
|
49 |
status_box = gr.Textbox()
|
50 |
+
#space_variables = API.get_space_variables(repo_id=experiment_repo)
|
51 |
+
#if 'STATUS' not in space_variables or space_variables['STATUS'].value != 'TRAINING':
|
52 |
+
# API.add_space_variable(repo_id=experiment_repo, key="STATUS", value="IDLE")
|
53 |
+
# status_box.value = "Status: Idle"
|
54 |
+
start = gr.Button("Start")
|
55 |
+
start.click(start_train, inputs=status_box, outputs=status_box)
|
56 |
+
#else:
|
57 |
+
# status_box.value = "Status: Training"
|
58 |
app.launch(server_name="0.0.0.0", server_port=7860)
|
59 |
|
60 |
if __name__ == '__main__':
|