Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ def generate_response(prompt):
|
|
85 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
86 |
|
87 |
# Display image directly in the chat
|
88 |
-
image_component = gr.Image(image_url)
|
89 |
|
90 |
return f"Movie Info:\n{movie_info}\n\nGenerated Response:\n{generated_text}", image_component
|
91 |
|
@@ -97,4 +97,4 @@ def chat_function(message, history):
|
|
97 |
|
98 |
# Create Gradio Chat Interface
|
99 |
chat_interface = gr.ChatInterface(chat_function)
|
100 |
-
chat_interface.launch(share=True)
|
|
|
85 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
86 |
|
87 |
# Display image directly in the chat
|
88 |
+
image_component = gr.Image(image_url, alt="Movie Poster")
|
89 |
|
90 |
return f"Movie Info:\n{movie_info}\n\nGenerated Response:\n{generated_text}", image_component
|
91 |
|
|
|
97 |
|
98 |
# Create Gradio Chat Interface
|
99 |
chat_interface = gr.ChatInterface(chat_function)
|
100 |
+
chat_interface.launch(share=True)
|