Spaces:
Sleeping
Sleeping
Commit ·
f57640b
1
Parent(s): 22be60d
Port Forwarding Problem Fix
Browse files
app.py
CHANGED
|
@@ -906,12 +906,12 @@ with gr.Blocks(title="🏆 Hackathon-Winning Query System", theme=gr.themes.Defa
|
|
| 906 |
outputs=[single_output]
|
| 907 |
)
|
| 908 |
|
|
|
|
|
|
|
| 909 |
if __name__ == "__main__":
|
| 910 |
-
#
|
| 911 |
-
# the
|
| 912 |
-
# It
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
show_error=True
|
| 917 |
-
)
|
|
|
|
| 906 |
outputs=[single_output]
|
| 907 |
)
|
| 908 |
|
| 909 |
+
app = gr.mount_gradio_app(api_app, demo, path="/")
|
| 910 |
+
|
| 911 |
if __name__ == "__main__":
|
| 912 |
+
# We run this single, combined 'app' instance on port 7860.
|
| 913 |
+
# This is the correct way to run a combined app on a single public port.
|
| 914 |
+
# It ensures that both your API endpoints and your Gradio frontend
|
| 915 |
+
# are served from the same server and are both accessible.
|
| 916 |
+
import uvicorn
|
| 917 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
|
|