Spaces:
Sleeping
Sleeping
Commit ·
c57c5cd
1
Parent(s): 22af9cc
Mounting Fix
Browse files
app.py
CHANGED
|
@@ -1174,28 +1174,8 @@ with gr.Blocks(
|
|
| 1174 |
outputs=[single_output]
|
| 1175 |
)
|
| 1176 |
|
| 1177 |
-
|
| 1178 |
-
if __name__ == "__main__":
|
| 1179 |
-
print("🚀 Starting Deployment-Ready Document QA System...")
|
| 1180 |
-
print(f"📊 Gradio version: {gr.__version__}")
|
| 1181 |
-
|
| 1182 |
-
# Run the application
|
| 1183 |
-
# ------------------ DELETE THIS BLOCK ------------------
|
| 1184 |
-
# uvicorn.run(
|
| 1185 |
-
# app,
|
| 1186 |
-
# host="0.0.0.0",
|
| 1187 |
-
# port=7860,
|
| 1188 |
-
# log_level="info",
|
| 1189 |
-
# access_log=False # Reduce log noise
|
| 1190 |
-
# )
|
| 1191 |
-
# --------------------------------------------------------
|
| 1192 |
|
| 1193 |
-
#
|
| 1194 |
if __name__ == "__main__":
|
| 1195 |
-
|
| 1196 |
-
print(f"📊 Gradio version: {gr.__version__}")
|
| 1197 |
-
|
| 1198 |
-
# Launch the app using Gradio's built-in server
|
| 1199 |
-
# This will also serve the FastAPI 'app' object
|
| 1200 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 1201 |
-
# --------------------------------------------------------
|
|
|
|
| 1174 |
outputs=[single_output]
|
| 1175 |
)
|
| 1176 |
|
| 1177 |
+
demo.mount_app(app)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1178 |
|
| 1179 |
+
# Launch only the Gradio app
|
| 1180 |
if __name__ == "__main__":
|
| 1181 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|