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