Spaces:
Running
on
Zero
Running
on
Zero
disabled ssr
Browse files
app.py
CHANGED
@@ -158,8 +158,7 @@ def predict(request: gr.Request, text_input, sample_size_slider, reduce_sample_c
|
|
158 |
"""
|
159 |
# Get the authentication token
|
160 |
token = _get_token(request)
|
161 |
-
|
162 |
-
print(f"Request: {request}")
|
163 |
# Check if input is empty or whitespace
|
164 |
print(f"Input: {text_input}")
|
165 |
if not text_input or text_input.isspace():
|
@@ -690,7 +689,7 @@ with gr.Blocks(theme=theme, css="""
|
|
690 |
# demo.launch(server_name="0.0.0.0", server_port=7860, share=True,allowed_paths=["/static"])
|
691 |
|
692 |
# Mount Gradio app to FastAPI
|
693 |
-
app = gr.mount_gradio_app(app, demo, path="/")
|
694 |
|
695 |
# Run both servers
|
696 |
if __name__ == "__main__":
|
|
|
158 |
"""
|
159 |
# Get the authentication token
|
160 |
token = _get_token(request)
|
161 |
+
|
|
|
162 |
# Check if input is empty or whitespace
|
163 |
print(f"Input: {text_input}")
|
164 |
if not text_input or text_input.isspace():
|
|
|
689 |
# demo.launch(server_name="0.0.0.0", server_port=7860, share=True,allowed_paths=["/static"])
|
690 |
|
691 |
# Mount Gradio app to FastAPI
|
692 |
+
app = gr.mount_gradio_app(app, demo, path="/",ssr_mode=False)
|
693 |
|
694 |
# Run both servers
|
695 |
if __name__ == "__main__":
|