Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -34,12 +34,6 @@ from NER_Distiller import distill_entities
|
|
| 34 |
# =========================
|
| 35 |
app = FastAPI()
|
| 36 |
|
| 37 |
-
# mount frontend
|
| 38 |
-
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 39 |
-
|
| 40 |
-
@app.get("/")
|
| 41 |
-
def home():
|
| 42 |
-
return FileResponse("static/index.html")
|
| 43 |
|
| 44 |
# =========================
|
| 45 |
# NER MODEL (your working one)
|
|
@@ -373,4 +367,12 @@ def predict_re(request: RERequest):
|
|
| 373 |
"resp": results,
|
| 374 |
"statusText": "OK",
|
| 375 |
"statusCode": 0
|
| 376 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
# =========================
|
| 35 |
app = FastAPI()
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
# =========================
|
| 39 |
# NER MODEL (your working one)
|
|
|
|
| 367 |
"resp": results,
|
| 368 |
"statusText": "OK",
|
| 369 |
"statusCode": 0
|
| 370 |
+
})
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
# mount frontend
|
| 374 |
+
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 375 |
+
|
| 376 |
+
@app.get("/")
|
| 377 |
+
def home():
|
| 378 |
+
return FileResponse("static/index.html")
|