Spaces:
Runtime error
Runtime error
LPX55
commited on
Commit
·
380e667
1
Parent(s):
4116878
Update app.py to enable queue processing in Gradio Blocks for improved performance and remove demo.queue() call for streamlined initialization.
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ import json
|
|
15 |
|
16 |
theme = gr.Theme.from_hub("LPX55/modal_ai")
|
17 |
|
18 |
-
with gr.Blocks(theme=theme, js=js_func, css=css_func) as demo:
|
19 |
show_space_tab = gr.State(False)
|
20 |
# Iframe lazy load pattern
|
21 |
heavy_iframe_src = gr.State("")
|
@@ -177,4 +177,4 @@ print(client.predict("Alex", 5, False, api_name="/greet"))
|
|
177 |
|
178 |
shared_state.change(pretty_json, shared_state, shared_state_box)
|
179 |
|
180 |
-
demo.
|
|
|
15 |
|
16 |
theme = gr.Theme.from_hub("LPX55/modal_ai")
|
17 |
|
18 |
+
with gr.Blocks(theme=theme, js=js_func, css=css_func, queue=True) as demo:
|
19 |
show_space_tab = gr.State(False)
|
20 |
# Iframe lazy load pattern
|
21 |
heavy_iframe_src = gr.State("")
|
|
|
177 |
|
178 |
shared_state.change(pretty_json, shared_state, shared_state_box)
|
179 |
|
180 |
+
demo.launch(mcp_server=True)
|