purrbits commited on
Commit
aea9aa9
·
verified ·
1 Parent(s): 8160b9d

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -250,7 +250,7 @@ async def generate_brat_video(
250
  finally:
251
  shutil.rmtree(temp_dir, ignore_errors=True)
252
 
253
- @app.get("/", summary="Root Endpoint", tags=["INFO"], description="Displaying the main page.")
254
  async def root():
255
  # take absolute path based on main.py file location
256
  html_path = os.path.join(os.path.dirname(__file__), "index.html")
@@ -259,7 +259,7 @@ async def root():
259
  return FileResponse(html_path)
260
  return JSONResponse(status_code=404, content={"error": "index.html file not found"})
261
 
262
- @app.get("/download/file/{filename}")
263
  async def download_file(filename: str):
264
  filepath = os.path.join(OUTPUT_DIR, filename)
265
  if not os.path.exists(filepath):
 
250
  finally:
251
  shutil.rmtree(temp_dir, ignore_errors=True)
252
 
253
+ @app.get("/", summary="Root Endpoint", tags=["MISC"], description="Displaying the main page.")
254
  async def root():
255
  # take absolute path based on main.py file location
256
  html_path = os.path.join(os.path.dirname(__file__), "index.html")
 
259
  return FileResponse(html_path)
260
  return JSONResponse(status_code=404, content={"error": "index.html file not found"})
261
 
262
+ @app.get("/download/file/{filename}", tags=["MISC"])
263
  async def download_file(filename: str):
264
  filepath = os.path.join(OUTPUT_DIR, filename)
265
  if not os.path.exists(filepath):