xset commited on
Commit
771988f
·
1 Parent(s): 22809e4

Revert "debug things"

Browse files

This reverts commit 77f5a26a2e86562d33586c6c42b4a0fe15a3c351.

Files changed (1) hide show
  1. main.py +1 -9
main.py CHANGED
@@ -8,7 +8,7 @@ import logging
8
  # Проверка версии NumPy
9
  assert np.__version__.startswith('1.'), f"Несовместимая версия NumPy: {np.__version__}"
10
 
11
- app = FastAPI(root_path="/")
12
 
13
  class RequestData(BaseModel):
14
  prompt: str
@@ -50,14 +50,6 @@ async def root_health_check():
50
 
51
  @app.post("/")
52
  async def generate_text(request: RequestData):
53
- print("Incoming path:", request.url.path)
54
- print("Headers:", dict(request.headers))
55
- body = await request.body()
56
- print("Raw body:", body)
57
-
58
- if not request.prompt:
59
- return JSONResponse(content={"status": "ok"})
60
-
61
  if not generator:
62
  raise HTTPException(status_code=503, detail="Модель не загружена")
63
 
 
8
  # Проверка версии NumPy
9
  assert np.__version__.startswith('1.'), f"Несовместимая версия NumPy: {np.__version__}"
10
 
11
+ app = FastAPI()
12
 
13
  class RequestData(BaseModel):
14
  prompt: str
 
50
 
51
  @app.post("/")
52
  async def generate_text(request: RequestData):
 
 
 
 
 
 
 
 
53
  if not generator:
54
  raise HTTPException(status_code=503, detail="Модель не загружена")
55