Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -67,15 +67,17 @@ def bot_streaming(message, history, max_new_tokens=250):
|
|
67 |
response = requests.get(url)
|
68 |
img = Image.open(BytesIO(response.content)).convert("RGB")
|
69 |
images.append(img)
|
70 |
-
except :
|
|
|
71 |
try:
|
72 |
if x['content'][0]['type']=='image':
|
73 |
-
url = x['content'][
|
74 |
response = requests.get(url)
|
75 |
img = Image.open(BytesIO(response.content)).convert("RGB")
|
76 |
images.append(img)
|
77 |
|
78 |
-
except:
|
|
|
79 |
pass
|
80 |
|
81 |
print("images ",images)
|
|
|
67 |
response = requests.get(url)
|
68 |
img = Image.open(BytesIO(response.content)).convert("RGB")
|
69 |
images.append(img)
|
70 |
+
except Exception as e:
|
71 |
+
print(e)
|
72 |
try:
|
73 |
if x['content'][0]['type']=='image':
|
74 |
+
url = x['content'][0]['url']
|
75 |
response = requests.get(url)
|
76 |
img = Image.open(BytesIO(response.content)).convert("RGB")
|
77 |
images.append(img)
|
78 |
|
79 |
+
except Exception as e:
|
80 |
+
print(e)
|
81 |
pass
|
82 |
|
83 |
print("images ",images)
|