mapotofu40 commited on
Commit
4845d75
·
1 Parent(s): 33f434e

Fix syntax error in handler

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -215,8 +215,7 @@ class EndpointHandler:
215
  tmp.write(response.content)
216
  file_path = tmp.name
217
  is_image = False
218
- if file_path:
219
- Path(file
220
  return {"error": "No input provided. Use 'inputs' (base64) or 'video_url'"}
221
 
222
  # Extract embeddings based on input type
@@ -244,7 +243,8 @@ class EndpointHandler:
244
  }
245
 
246
  # Clean up temporary file
247
- Path(video_path).unlink(missing_ok=True)
 
248
 
249
  return {
250
  "success": True,
 
215
  tmp.write(response.content)
216
  file_path = tmp.name
217
  is_image = False
218
+ else:
 
219
  return {"error": "No input provided. Use 'inputs' (base64) or 'video_url'"}
220
 
221
  # Extract embeddings based on input type
 
243
  }
244
 
245
  # Clean up temporary file
246
+ if file_path:
247
+ Path(file_path).unlink(missing_ok=True)
248
 
249
  return {
250
  "success": True,