Spaces:
Running
Running
admin
commited on
Commit
·
2fbc1c8
1
Parent(s):
a98d805
use tabs
Browse files
app.py
CHANGED
@@ -47,44 +47,39 @@ def tasklst():
|
|
47 |
if __name__ == "__main__":
|
48 |
monitor()
|
49 |
with gr.Blocks() as demo:
|
50 |
-
with gr.
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
flagging_mode="never",
|
58 |
-
)
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
)
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
)
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
)
|
89 |
|
90 |
demo.launch()
|
|
|
47 |
if __name__ == "__main__":
|
48 |
monitor()
|
49 |
with gr.Blocks() as demo:
|
50 |
+
with gr.Tab("See current task status"):
|
51 |
+
gr.Interface(
|
52 |
+
fn=tasklst,
|
53 |
+
inputs=None,
|
54 |
+
outputs=gr.TextArea(label="Current task details"),
|
55 |
+
flagging_mode="never",
|
56 |
+
)
|
|
|
|
|
57 |
|
58 |
+
with gr.Tab("Trigger once manually"):
|
59 |
+
gr.Interface(
|
60 |
+
fn=trigger,
|
61 |
+
inputs=None,
|
62 |
+
outputs=gr.TextArea(label="Activation logs"),
|
63 |
+
flagging_mode="never",
|
64 |
+
)
|
|
|
65 |
|
66 |
+
with gr.Tab("Cookie test"):
|
67 |
+
gr.Interface(
|
68 |
+
fn=test_restart,
|
69 |
+
inputs=gr.Textbox(label="Restart a space with permissions"),
|
70 |
+
outputs=[
|
71 |
+
gr.Textbox(label="Status"),
|
72 |
+
gr.Markdown(container=True, show_label=True, label="Shortcut"),
|
73 |
+
],
|
74 |
+
flagging_mode="never",
|
75 |
+
)
|
|
|
76 |
|
77 |
+
with gr.Tab("SMTP test"):
|
78 |
+
gr.Interface(
|
79 |
+
fn=send_email,
|
80 |
+
inputs=None,
|
81 |
+
outputs=gr.Textbox(label="Status"),
|
82 |
+
flagging_mode="never",
|
83 |
+
)
|
|
|
84 |
|
85 |
demo.launch()
|