Spaces:
Running
on
Zero
Running
on
Zero
mjavaid
commited on
Commit
·
43565c9
1
Parent(s):
4e123e8
first commit
Browse files
app.py
CHANGED
@@ -38,6 +38,7 @@ def generate_response(user_text, user_image, history):
|
|
38 |
response = output[0][0]["generated_text"][-1]["content"]
|
39 |
except (KeyError, IndexError, TypeError):
|
40 |
# Fallback: return the raw output as a string.
|
|
|
41 |
response = str(output)
|
42 |
|
43 |
history.append((user_text, response))
|
@@ -57,4 +58,6 @@ with gr.Blocks() as demo:
|
|
57 |
state = gr.State([])
|
58 |
|
59 |
txt.submit(generate_response, inputs=[txt, img, state], outputs=[chatbot, state])
|
|
|
|
|
60 |
demo.launch()
|
|
|
38 |
response = output[0][0]["generated_text"][-1]["content"]
|
39 |
except (KeyError, IndexError, TypeError):
|
40 |
# Fallback: return the raw output as a string.
|
41 |
+
print(response)
|
42 |
response = str(output)
|
43 |
|
44 |
history.append((user_text, response))
|
|
|
58 |
state = gr.State([])
|
59 |
|
60 |
txt.submit(generate_response, inputs=[txt, img, state], outputs=[chatbot, state])
|
61 |
+
|
62 |
+
if __name__ == "__main__":
|
63 |
demo.launch()
|