Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,7 @@ from pptx import Presentation
|
|
| 12 |
|
| 13 |
from fastapi import FastAPI, File, UploadFile, HTTPException
|
| 14 |
from fastapi.responses import HTMLResponse
|
|
|
|
| 15 |
|
| 16 |
app = FastAPI()
|
| 17 |
|
|
@@ -261,5 +262,7 @@ with gr.Blocks(css=CSS, theme="soft", fill_height=True) as demo:
|
|
| 261 |
|
| 262 |
if __name__ == "__main__":
|
| 263 |
|
| 264 |
-
|
|
|
|
|
|
|
| 265 |
#demo.queue(api_open=False).launch(show_api=False, share=False, )#server_name="0.0.0.0", )
|
|
|
|
| 12 |
|
| 13 |
from fastapi import FastAPI, File, UploadFile, HTTPException
|
| 14 |
from fastapi.responses import HTMLResponse
|
| 15 |
+
from fastapi.staticfiles import StaticFiles
|
| 16 |
|
| 17 |
app = FastAPI()
|
| 18 |
|
|
|
|
| 262 |
|
| 263 |
if __name__ == "__main__":
|
| 264 |
|
| 265 |
+
app.mount("/static", StaticFiles(directory="static", html=True), name="static")
|
| 266 |
+
app = gr.mount_gradio_app(app, block, "/", gradio_api_url="http://localhost:7860/")
|
| 267 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 268 |
#demo.queue(api_open=False).launch(show_api=False, share=False, )#server_name="0.0.0.0", )
|