xset commited on
Commit
2c6cccc
·
1 Parent(s): e87cc8b

moved generate to /

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -44,7 +44,7 @@ async def startup_event():
44
  routes = [route.path for route in app.routes]
45
  print(f"Registered routes: {routes}")
46
 
47
- @app.post("/generate")
48
  async def generate_text(request: RequestData):
49
  if not generator:
50
  raise HTTPException(status_code=503, detail="Модель не загружена")
@@ -61,6 +61,6 @@ async def generate_text(request: RequestData):
61
  except Exception as e:
62
  raise HTTPException(status_code=500, detail=str(e))
63
 
64
- @app.get("/")
65
  async def health_check():
66
  return {"status": "ok" if generator else "unavailable"}
 
44
  routes = [route.path for route in app.routes]
45
  print(f"Registered routes: {routes}")
46
 
47
+ @app.post("/")
48
  async def generate_text(request: RequestData):
49
  if not generator:
50
  raise HTTPException(status_code=503, detail="Модель не загружена")
 
61
  except Exception as e:
62
  raise HTTPException(status_code=500, detail=str(e))
63
 
64
+ @app.get("/health")
65
  async def health_check():
66
  return {"status": "ok" if generator else "unavailable"}