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.\n"
|
| 59 |
-
f"USER: {prompt}\n"
|
| 60 |
"Writer AI:"
|
| 61 |
)
|
| 62 |
|
|
@@ -91,9 +91,9 @@ def chat_function(message, history):
|
|
| 91 |
# Create Gradio Chat Interface
|
| 92 |
chat_interface = gr.ChatInterface(
|
| 93 |
chat_function,
|
| 94 |
-
textbox=gr.Textbox(placeholder="Type in
|
| 95 |
-
title="Palmyra-small
|
| 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)
|
|
|
|
| 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 \n"
|
| 59 |
+
f"USER: {prompt}\n \n"
|
| 60 |
"Writer AI:"
|
| 61 |
)
|
| 62 |
|
|
|
|
| 91 |
# Create Gradio Chat Interface
|
| 92 |
chat_interface = gr.ChatInterface(
|
| 93 |
chat_function,
|
| 94 |
+
textbox=gr.Textbox(placeholder="Type in any movie title, e.g., Oppenheimer, Barbie, Poor Things ", container=False, scale=7),
|
| 95 |
+
title="Palmyra-small Chatbot - Movie info ",
|
| 96 |
+
description="This chatbot is powered by the Writer/Palmyra-small model and TMdb API. Type in any movie title and the chatbot will respond with the title, release date, genre, and link for more information. ",
|
| 97 |
theme="soft",
|
| 98 |
examples=["Oppenheimer", "Barbie", "Poor Things"],)
|
| 99 |
chat_interface.launch(share=True)
|