Spaces:
Running
on
Zero
Running
on
Zero
mjavaid
commited on
Commit
·
a05aab1
1
Parent(s):
b5a8693
first commit
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def generate_response(user_text, user_image, history):
|
|
38 |
|
39 |
# Attempt to extract the generated content using the expected structure.
|
40 |
try:
|
41 |
-
response = output[0][
|
42 |
history.append((user_text, response))
|
43 |
|
44 |
except (KeyError, IndexError, TypeError):
|
|
|
38 |
|
39 |
# Attempt to extract the generated content using the expected structure.
|
40 |
try:
|
41 |
+
response = output[0]["generated_text"][-1]["content"]
|
42 |
history.append((user_text, response))
|
43 |
|
44 |
except (KeyError, IndexError, TypeError):
|