Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -74,9 +74,9 @@ def generate_response(user_message, chat_history):
|
|
74 |
|
75 |
# Call the Hugging Face chat completions API.
|
76 |
completion = client.chat.completions.create(
|
77 |
-
model="
|
78 |
messages=conversation,
|
79 |
-
max_tokens=
|
80 |
)
|
81 |
|
82 |
# The API response may return a dictionary or a string for the assistant's message.
|
@@ -106,10 +106,11 @@ with gr.Blocks() as demo:
|
|
106 |
|
107 |
chatbot = gr.Chatbot()
|
108 |
with gr.Row():
|
|
|
109 |
txt = gr.Textbox(
|
110 |
show_label=False,
|
111 |
placeholder="Enter your message here and press Enter"
|
112 |
-
)
|
113 |
|
114 |
# Wire up the textbox submission to our generate_response function.
|
115 |
txt.submit(generate_response, [txt, chatbot], [txt, chatbot])
|
|
|
74 |
|
75 |
# Call the Hugging Face chat completions API.
|
76 |
completion = client.chat.completions.create(
|
77 |
+
model="meta-llama/Llama-3.3-70B-Instruct",
|
78 |
messages=conversation,
|
79 |
+
max_tokens=500,
|
80 |
)
|
81 |
|
82 |
# The API response may return a dictionary or a string for the assistant's message.
|
|
|
106 |
|
107 |
chatbot = gr.Chatbot()
|
108 |
with gr.Row():
|
109 |
+
# Removed .style(container=False)
|
110 |
txt = gr.Textbox(
|
111 |
show_label=False,
|
112 |
placeholder="Enter your message here and press Enter"
|
113 |
+
)
|
114 |
|
115 |
# Wire up the textbox submission to our generate_response function.
|
116 |
txt.submit(generate_response, [txt, chatbot], [txt, chatbot])
|