Commit
·
69b1728
1
Parent(s):
28e9187
Use green theme
Browse files
app.py
CHANGED
|
@@ -63,8 +63,11 @@ def start_ml_worker(url, api_key, hf_token):
|
|
| 63 |
thread.start()
|
| 64 |
return f"ML worker running for {url}"
|
| 65 |
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
with gr.Blocks() as iface:
|
| 68 |
with gr.Row():
|
| 69 |
with gr.Column():
|
| 70 |
url_input = gr.Textbox(label="Giskard Hub URL")
|
|
@@ -73,10 +76,10 @@ with gr.Blocks() as iface:
|
|
| 73 |
|
| 74 |
output = gr.Textbox(label="Status")
|
| 75 |
with gr.Row():
|
| 76 |
-
run_btn = gr.Button("Run")
|
| 77 |
run_btn.click(start_ml_worker, [url_input, api_key_input, hf_token_input], output)
|
| 78 |
|
| 79 |
-
stop_btn = gr.Button("Stop")
|
| 80 |
stop_btn.click(stop_ml_worker, None, output)
|
| 81 |
|
| 82 |
logs = gr.Textbox(label="Giskard ML worker log:")
|
|
|
|
| 63 |
thread.start()
|
| 64 |
return f"ML worker running for {url}"
|
| 65 |
|
| 66 |
+
theme = gr.themes.Soft(
|
| 67 |
+
primary_hue="green",
|
| 68 |
+
)
|
| 69 |
|
| 70 |
+
with gr.Blocks(theme=theme) as iface:
|
| 71 |
with gr.Row():
|
| 72 |
with gr.Column():
|
| 73 |
url_input = gr.Textbox(label="Giskard Hub URL")
|
|
|
|
| 76 |
|
| 77 |
output = gr.Textbox(label="Status")
|
| 78 |
with gr.Row():
|
| 79 |
+
run_btn = gr.Button("Run", variant="primary")
|
| 80 |
run_btn.click(start_ml_worker, [url_input, api_key_input, hf_token_input], output)
|
| 81 |
|
| 82 |
+
stop_btn = gr.Button("Stop", variant="stop")
|
| 83 |
stop_btn.click(stop_ml_worker, None, output)
|
| 84 |
|
| 85 |
logs = gr.Textbox(label="Giskard ML worker log:")
|