Spaces:
Sleeping
Sleeping
Update Summarization/main.py
Browse files- Summarization/main.py +1 -2
Summarization/main.py
CHANGED
@@ -19,7 +19,7 @@ app.add_middleware(
|
|
19 |
current_dir = Path(__file__).parent
|
20 |
templates = Jinja2Templates(directory=current_dir.parent / "templates")
|
21 |
|
22 |
-
@app.get("/", response_class=HTMLResponse)
|
23 |
async def serve_home(request: Request):
|
24 |
return templates.TemplateResponse("HomeS.html", {"request": request})
|
25 |
|
@@ -46,7 +46,6 @@ async def serve_file(filename: str, request: Request):
|
|
46 |
if not os.path.exists(filepath):
|
47 |
return JSONResponse({"error": "File not found"}, status_code=404)
|
48 |
|
49 |
-
# Determine correct media type and set attachment disposition
|
50 |
media_type, _ = mimetypes.guess_type(filepath)
|
51 |
if media_type is None:
|
52 |
media_type = "application/octet-stream"
|
|
|
19 |
current_dir = Path(__file__).parent
|
20 |
templates = Jinja2Templates(directory=current_dir.parent / "templates")
|
21 |
|
22 |
+
@app.get("/", response_class=HTMLResponse)
|
23 |
async def serve_home(request: Request):
|
24 |
return templates.TemplateResponse("HomeS.html", {"request": request})
|
25 |
|
|
|
46 |
if not os.path.exists(filepath):
|
47 |
return JSONResponse({"error": "File not found"}, status_code=404)
|
48 |
|
|
|
49 |
media_type, _ = mimetypes.guess_type(filepath)
|
50 |
if media_type is None:
|
51 |
media_type = "application/octet-stream"
|