Spaces:
Sleeping
Sleeping
Commit
·
b0b3c8b
1
Parent(s):
8a84a80
Update app.py
Browse files
app.py
CHANGED
@@ -76,6 +76,12 @@ async def predict(request: Request):
|
|
76 |
elif mode == "advanced":
|
77 |
return 0
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
if __name__ == "__main__":
|
80 |
port = int(os.getenv("PORT", 8000))
|
81 |
uvicorn.run(app, host="0.0.0.0", port=port)
|
|
|
76 |
elif mode == "advanced":
|
77 |
return 0
|
78 |
|
79 |
+
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
80 |
+
|
81 |
+
@app.get("/")
|
82 |
+
def index() -> FileResponse:
|
83 |
+
return FileResponse(path="/app/static/index.html", media_type="text/html")
|
84 |
+
|
85 |
if __name__ == "__main__":
|
86 |
port = int(os.getenv("PORT", 8000))
|
87 |
uvicorn.run(app, host="0.0.0.0", port=port)
|