Spaces:
Runtime error
Runtime error
Eric Michael Martinez
commited on
Commit
•
fd85e62
1
Parent(s):
21a7ced
update temperature
Browse files- app/app.py +4 -4
app/app.py
CHANGED
@@ -118,7 +118,7 @@ def generate_image(prompt):
|
|
118 |
|
119 |
|
120 |
# Define a function to handle the chat interaction with the AI model
|
121 |
-
def chat(
|
122 |
# Initialize chatbot_messages
|
123 |
chatbot_messages = chatbot_messages or []
|
124 |
|
@@ -192,7 +192,7 @@ def get_chatbot_app(additional_examples=[]):
|
|
192 |
value="gpt-3.5-turbo",
|
193 |
)
|
194 |
temperature_slider = gr.Slider(
|
195 |
-
minimum=0, maximum=2, step=0.1, value=0
|
196 |
)
|
197 |
# Create a chatbot interface for the conversation
|
198 |
chatbot = gr.Chatbot(label="Conversation")
|
@@ -211,11 +211,11 @@ def get_chatbot_app(additional_examples=[]):
|
|
211 |
btn.click(
|
212 |
chat,
|
213 |
inputs=[
|
|
|
|
|
214 |
model_selector,
|
215 |
temperature_slider,
|
216 |
system_message,
|
217 |
-
message,
|
218 |
-
chatbot,
|
219 |
],
|
220 |
outputs=[message, chatbot],
|
221 |
)
|
|
|
118 |
|
119 |
|
120 |
# Define a function to handle the chat interaction with the AI model
|
121 |
+
def chat(message, chatbot_messages, model, temperature, system_message):
|
122 |
# Initialize chatbot_messages
|
123 |
chatbot_messages = chatbot_messages or []
|
124 |
|
|
|
192 |
value="gpt-3.5-turbo",
|
193 |
)
|
194 |
temperature_slider = gr.Slider(
|
195 |
+
label="Temperature", minimum=0, maximum=2, step=0.1, value=0
|
196 |
)
|
197 |
# Create a chatbot interface for the conversation
|
198 |
chatbot = gr.Chatbot(label="Conversation")
|
|
|
211 |
btn.click(
|
212 |
chat,
|
213 |
inputs=[
|
214 |
+
message,
|
215 |
+
chatbot,
|
216 |
model_selector,
|
217 |
temperature_slider,
|
218 |
system_message,
|
|
|
|
|
219 |
],
|
220 |
outputs=[message, chatbot],
|
221 |
)
|