Spaces:
Sleeping
Sleeping
Commit
·
87bfb33
1
Parent(s):
a54c80e
Clean up imports
Browse files
main.py
CHANGED
|
@@ -4,7 +4,6 @@ Handles video generation, image processing, and API integrations
|
|
| 4 |
"""
|
| 5 |
|
| 6 |
from fastapi import FastAPI, HTTPException, Request, Response
|
| 7 |
-
from fastapi import Request as FastAPIRequest
|
| 8 |
from fastapi.middleware.cors import CORSMiddleware
|
| 9 |
from fastapi.responses import StreamingResponse, JSONResponse
|
| 10 |
from fastapi.staticfiles import StaticFiles
|
|
@@ -142,7 +141,7 @@ if os.path.exists(frontend_dist_path):
|
|
| 142 |
# Serve frontend index.html for all non-API routes
|
| 143 |
# This must be last to not interfere with API routes
|
| 144 |
@app.get("/{full_path:path}")
|
| 145 |
-
async def serve_frontend(full_path: str
|
| 146 |
"""Serve frontend for all non-API routes"""
|
| 147 |
# Don't serve frontend for API routes or docs - let FastAPI handle these
|
| 148 |
if (full_path.startswith("api/") or
|
|
|
|
| 4 |
"""
|
| 5 |
|
| 6 |
from fastapi import FastAPI, HTTPException, Request, Response
|
|
|
|
| 7 |
from fastapi.middleware.cors import CORSMiddleware
|
| 8 |
from fastapi.responses import StreamingResponse, JSONResponse
|
| 9 |
from fastapi.staticfiles import StaticFiles
|
|
|
|
| 141 |
# Serve frontend index.html for all non-API routes
|
| 142 |
# This must be last to not interfere with API routes
|
| 143 |
@app.get("/{full_path:path}")
|
| 144 |
+
async def serve_frontend(full_path: str):
|
| 145 |
"""Serve frontend for all non-API routes"""
|
| 146 |
# Don't serve frontend for API routes or docs - let FastAPI handle these
|
| 147 |
if (full_path.startswith("api/") or
|