userIdc2024 commited on
Commit
f244d06
·
verified ·
1 Parent(s): f4f8953

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -25,11 +25,9 @@ def health():
25
  @app.post("/generate", response_model=GenerateResponse)
26
  def generate(req: GenerateRequest):
27
  try:
28
- urls = get_analysis(req.img_url)
29
- # Basic sanity check
30
- if not isinstance(urls, list):
31
- raise ValueError("get_images must return a List[str]")
32
- return {"urls": urls}
33
  except Exception as e:
34
  # Log in real app; return sanitized error
35
  raise HTTPException(status_code=500, detail=str(e))
 
25
  @app.post("/generate", response_model=GenerateResponse)
26
  def generate(req: GenerateRequest):
27
  try:
28
+ analysis = get_analysis(req.img_url)
29
+
30
+ return {"analysis": analysis}
 
 
31
  except Exception as e:
32
  # Log in real app; return sanitized error
33
  raise HTTPException(status_code=500, detail=str(e))