Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,11 +77,14 @@ stream = Stream(
|
|
| 77 |
],
|
| 78 |
)
|
| 79 |
|
| 80 |
-
#
|
| 81 |
-
|
|
|
|
|
|
|
| 82 |
|
| 83 |
if __name__ == "__main__":
|
| 84 |
import uvicorn
|
| 85 |
-
|
| 86 |
port = int(os.getenv("PORT", 7860))
|
|
|
|
| 87 |
uvicorn.run(app, host="0.0.0.0", port=port)
|
|
|
|
| 77 |
],
|
| 78 |
)
|
| 79 |
|
| 80 |
+
# ... (Handler und Stream Definitionen bleiben gleich)
|
| 81 |
+
|
| 82 |
+
# Wir nutzen stream.ui, was ein normales gradio.Blocks Objekt ist
|
| 83 |
+
app = gr.mount_gradio_app(FastAPI(), stream.ui, path="/")
|
| 84 |
|
| 85 |
if __name__ == "__main__":
|
| 86 |
import uvicorn
|
| 87 |
+
import os
|
| 88 |
port = int(os.getenv("PORT", 7860))
|
| 89 |
+
# Wir starten die 'app' (FastAPI), die nun das Gradio UI auf "/" enthält
|
| 90 |
uvicorn.run(app, host="0.0.0.0", port=port)
|