Update app.py
Browse files
app.py
CHANGED
|
@@ -4,17 +4,7 @@ import sys
|
|
| 4 |
# Adjust PYTHONPATH
|
| 5 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
|
| 6 |
|
| 7 |
-
from src.gradio_server import
|
| 8 |
-
import uvicorn
|
| 9 |
-
from threading import Thread
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
uvicorn.run(app, host="0.0.0.0", port=8000)
|
| 14 |
-
|
| 15 |
-
# Start the FastAPI server in a separate thread
|
| 16 |
-
fastapi_thread = Thread(target=run_fastapi)
|
| 17 |
-
fastapi_thread.start()
|
| 18 |
-
|
| 19 |
-
# Launch the Gradio interface
|
| 20 |
-
iface_combined.launch(server_name="0.0.0.0", server_port=7861, share=True)
|
|
|
|
| 4 |
# Adjust PYTHONPATH
|
| 5 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
|
| 6 |
|
| 7 |
+
from src.gradio_server import iface_combined
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
if __name__ == "__main__":
|
| 10 |
+
iface_combined.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|