Hasitha16 commited on
Commit
d50fb7e
·
verified ·
1 Parent(s): 295b8c7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -79,7 +79,7 @@ def auto_fill(value: Optional[str], fallback: str) -> str:
79
  @app.post("/analyze/")
80
  async def analyze(data: ReviewInput, x_api_key: str = Header(None)):
81
  if x_api_key and x_api_key != VALID_API_KEY:
82
- raise HTTPException(status_code=401, detail="❌ Invalid API key")
83
  if len(data.text.split()) < 20:
84
  raise HTTPException(status_code=400, detail="⚠️ Review too short for analysis (min. 20 words).")
85
 
 
79
  @app.post("/analyze/")
80
  async def analyze(data: ReviewInput, x_api_key: str = Header(None)):
81
  if x_api_key and x_api_key != VALID_API_KEY:
82
+ raise HTTPException(status_code=401, detail="❌ Invalid API key")
83
  if len(data.text.split()) < 20:
84
  raise HTTPException(status_code=400, detail="⚠️ Review too short for analysis (min. 20 words).")
85