Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -206,3 +206,13 @@ def predict(request: NERRequest):
|
|
| 206 |
media_type="application/json",
|
| 207 |
status_code=200,
|
| 208 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
media_type="application/json",
|
| 207 |
status_code=200,
|
| 208 |
)
|
| 209 |
+
|
| 210 |
+
from fastapi.staticfiles import StaticFiles
|
| 211 |
+
from fastapi.responses import FileResponse
|
| 212 |
+
|
| 213 |
+
# mount frontend
|
| 214 |
+
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 215 |
+
|
| 216 |
+
@app.get("/")
|
| 217 |
+
def home():
|
| 218 |
+
return FileResponse("static/index.html")
|