Update app.py
Browse files
app.py
CHANGED
@@ -103,8 +103,8 @@ def generate_response(prompt):
|
|
103 |
|
104 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
105 |
|
106 |
-
return f"Movie Info:\n{movie_info['title']}, {movie_info['year']}, {movie_info['genre']}\n\n" \
|
107 |
-
|
108 |
|
109 |
# Define chat function for gr.ChatInterface
|
110 |
def chat_function(message, history):
|
@@ -115,7 +115,4 @@ def chat_function(message, history):
|
|
115 |
|
116 |
# Create Gradio Chat Interface
|
117 |
chat_interface = gr.ChatInterface(chat_function)
|
118 |
-
chat_interface.launch(share=True)
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
103 |
|
104 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
105 |
|
106 |
+
return (f"Movie Info:\n{movie_info['title']}, {movie_info['year']}, {movie_info['genre']}\n\n" \
|
107 |
+
f"Generated Response:\n{generated_text}", image_url)
|
108 |
|
109 |
# Define chat function for gr.ChatInterface
|
110 |
def chat_function(message, history):
|
|
|
115 |
|
116 |
# Create Gradio Chat Interface
|
117 |
chat_interface = gr.ChatInterface(chat_function)
|
118 |
+
chat_interface.launch(share=True)
|
|
|
|
|
|