Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,21 @@ def respond(message, history):
|
|
89 |
response = client.chat_completion(
|
90 |
messages, max_tokens = 700, temperature=1.3, top_p=0.6
|
91 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
return response['choices'][0]['message']['content'].strip()
|
93 |
-
chatbot = gr.ChatInterface(respond, type="messages")
|
94 |
chatbot.launch()
|
95 |
chatbot.chatbot.update([(None, "Hey! I’m your Gen-Z watch buddy \nI help you find your next favorite TV show based on what you have liked before, your age, and your favorite genre. Just say what you're into!")])
|
|
|
89 |
response = client.chat_completion(
|
90 |
messages, max_tokens = 700, temperature=1.3, top_p=0.6
|
91 |
)
|
92 |
+
chat_theme = gr.themes.Soft(
|
93 |
+
primary_hue="FDE9E9",
|
94 |
+
secondary_hue="D17E96",
|
95 |
+
neutral_hue="9BADDC",
|
96 |
+
spacing_size="lg",
|
97 |
+
radius_size="lg"
|
98 |
+
).set(
|
99 |
+
# Input area
|
100 |
+
input_background_fill="*neutral_50",
|
101 |
+
input_border_color_focus="*primary_300",
|
102 |
+
# Button styling
|
103 |
+
button_primary_background_fill="*primary_500",
|
104 |
+
button_primary_background_fill_hover="*primary_400"
|
105 |
+
)
|
106 |
return response['choices'][0]['message']['content'].strip()
|
107 |
+
chatbot = gr.ChatInterface(respond, type="messages", theme=chat_theme)
|
108 |
chatbot.launch()
|
109 |
chatbot.chatbot.update([(None, "Hey! I’m your Gen-Z watch buddy \nI help you find your next favorite TV show based on what you have liked before, your age, and your favorite genre. Just say what you're into!")])
|