Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,8 @@ def get_movie_info(movie_title):
|
|
55 |
def generate_response(prompt):
|
56 |
input_text_template = (
|
57 |
"Hi! I am a gen AI bot powered by the Writer/palmyra-small model. "
|
58 |
-
"I am here to give helpful, detailed, and polite answers to your movie inquiries
|
59 |
-
f"USER: {prompt}"
|
60 |
"Writer AI:"
|
61 |
)
|
62 |
|
@@ -89,5 +89,11 @@ def chat_function(message, history):
|
|
89 |
return response
|
90 |
|
91 |
# Create Gradio Chat Interface
|
92 |
-
chat_interface = gr.ChatInterface(
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
chat_interface.launch(share=True)
|
|
|
55 |
def generate_response(prompt):
|
56 |
input_text_template = (
|
57 |
"Hi! I am a gen AI bot powered by the Writer/palmyra-small model. "
|
58 |
+
"I am here to give helpful, detailed, and polite answers to your movie inquiries.\n"
|
59 |
+
f"USER: {prompt}\n"
|
60 |
"Writer AI:"
|
61 |
)
|
62 |
|
|
|
89 |
return response
|
90 |
|
91 |
# Create Gradio Chat Interface
|
92 |
+
chat_interface = gr.ChatInterface(
|
93 |
+
chat_function,
|
94 |
+
textbox=gr.Textbox(placeholder="Type in a movie title", container=False, scale=7),
|
95 |
+
title="Palmyra-small, Movie Chatbot ",
|
96 |
+
description="Type in any movie title for more information",
|
97 |
+
theme="soft",
|
98 |
+
examples=["Oppenheimer", "Barbie", "Poor Things"],)
|
99 |
chat_interface.launch(share=True)
|