Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,6 +68,18 @@ async def convert_document(
|
|
| 68 |
if output_path.exists():
|
| 69 |
output_path.unlink()
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
@app.get("/health")
|
| 72 |
async def health_check():
|
| 73 |
return {"status": "healthy"}
|
|
|
|
| 68 |
if output_path.exists():
|
| 69 |
output_path.unlink()
|
| 70 |
|
| 71 |
+
app.add_middleware(
|
| 72 |
+
CORSMiddleware,
|
| 73 |
+
allow_origins=["*"],
|
| 74 |
+
allow_credentials=True,
|
| 75 |
+
allow_methods=["*"],
|
| 76 |
+
allow_headers=["*"],
|
| 77 |
+
)
|
| 78 |
+
|
| 79 |
+
from fastapi.staticfiles import StaticFiles
|
| 80 |
+
app.mount("/", StaticFiles(directory="static/ui", html=True), name="index")
|
| 81 |
+
|
| 82 |
+
|
| 83 |
@app.get("/health")
|
| 84 |
async def health_check():
|
| 85 |
return {"status": "healthy"}
|