Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,8 @@ from fastapi import FastAPI, File, UploadFile, HTTPException
|
|
| 14 |
from fastapi.responses import HTMLResponse
|
| 15 |
from fastapi.staticfiles import StaticFiles
|
| 16 |
|
|
|
|
|
|
|
| 17 |
app = FastAPI()
|
| 18 |
|
| 19 |
@app.post("/test/")
|
|
@@ -262,7 +264,7 @@ with gr.Blocks(css=CSS, theme="soft", fill_height=True) as demo:
|
|
| 262 |
|
| 263 |
if __name__ == "__main__":
|
| 264 |
|
| 265 |
-
|
| 266 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 267 |
|
| 268 |
#app.mount("/static", StaticFiles(directory="static", html=True), name="static")
|
|
|
|
| 14 |
from fastapi.responses import HTMLResponse
|
| 15 |
from fastapi.staticfiles import StaticFiles
|
| 16 |
|
| 17 |
+
import uvicorn
|
| 18 |
+
|
| 19 |
app = FastAPI()
|
| 20 |
|
| 21 |
@app.post("/test/")
|
|
|
|
| 264 |
|
| 265 |
if __name__ == "__main__":
|
| 266 |
|
| 267 |
+
app = gr.mount_gradio_app(app, demo, "/")
|
| 268 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 269 |
|
| 270 |
#app.mount("/static", StaticFiles(directory="static", html=True), name="static")
|