Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def launch_bot():
|
|
23 |
return "β
Bot launched successfully."
|
24 |
|
25 |
def get_logs():
|
26 |
-
return logs[-2000:]
|
27 |
|
28 |
with gr.Blocks() as demo:
|
29 |
gr.Markdown("# π¬ TheMovieProviderBot Interface")
|
@@ -31,10 +31,12 @@ with gr.Blocks() as demo:
|
|
31 |
gr.Markdown("[π¦ Click here to download bot files](static/setup.zip)")
|
32 |
|
33 |
with gr.Row():
|
34 |
-
gr.Button("Start Bot")
|
35 |
-
gr.Button("π Refresh Logs")
|
36 |
|
37 |
log_output = gr.Textbox(label="π Bot Logs", lines=20)
|
38 |
-
|
|
|
|
|
39 |
|
40 |
demo.launch()
|
|
|
23 |
return "β
Bot launched successfully."
|
24 |
|
25 |
def get_logs():
|
26 |
+
return logs[-2000:]
|
27 |
|
28 |
with gr.Blocks() as demo:
|
29 |
gr.Markdown("# π¬ TheMovieProviderBot Interface")
|
|
|
31 |
gr.Markdown("[π¦ Click here to download bot files](static/setup.zip)")
|
32 |
|
33 |
with gr.Row():
|
34 |
+
launch_btn = gr.Button("π Start Bot")
|
35 |
+
refresh_btn = gr.Button("π Refresh Logs")
|
36 |
|
37 |
log_output = gr.Textbox(label="π Bot Logs", lines=20)
|
38 |
+
|
39 |
+
launch_btn.click(fn=launch_bot, outputs=None)
|
40 |
+
refresh_btn.click(fn=get_logs, outputs=log_output)
|
41 |
|
42 |
demo.launch()
|