kuzumab commited on
Commit
3d98dd6
·
verified ·
1 Parent(s): b80bdf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,12 +26,12 @@ class AttachmentDownloadTool(Tool):
26
  try:
27
  response = requests.get(download_url + task_id, stream=True, timeout=15)
28
  if response.status_code != 200:
29
- return None
30
  file_obj = io.BytesIO(response.content)
31
  file_obj.seek(0)
32
  return file_obj
33
  except Exception as e:
34
- return None
35
 
36
  class ImageCaptionTool(Tool):
37
  name = "image-captioner"
 
26
  try:
27
  response = requests.get(download_url + task_id, stream=True, timeout=15)
28
  if response.status_code != 200:
29
+ return io.BytesIO()
30
  file_obj = io.BytesIO(response.content)
31
  file_obj.seek(0)
32
  return file_obj
33
  except Exception as e:
34
+ return io.BytesIO()
35
 
36
  class ImageCaptionTool(Tool):
37
  name = "image-captioner"