Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token="hf_gzFQTPmbxocKx
|
|
6 |
|
7 |
def send_message(message):
|
8 |
messages = [{"role": "user", "content": message}]
|
9 |
-
response = client.chat_completion(messages, max_tokens=150
|
10 |
return response
|
11 |
|
12 |
def main():
|
@@ -17,10 +17,10 @@ def main():
|
|
17 |
|
18 |
if st.button("Send"):
|
19 |
with st.spinner('AI is typing...'):
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
if __name__ == "__main__":
|
26 |
main()
|
|
|
6 |
|
7 |
def send_message(message):
|
8 |
messages = [{"role": "user", "content": message}]
|
9 |
+
response = client.chat_completion(messages, max_tokens=150)
|
10 |
return response
|
11 |
|
12 |
def main():
|
|
|
17 |
|
18 |
if st.button("Send"):
|
19 |
with st.spinner('AI is typing...'):
|
20 |
+
response = send_message(user_input)
|
21 |
+
# Display complete response
|
22 |
+
for choice in response.choices:
|
23 |
+
st.write(choice.message.content)
|
24 |
|
25 |
if __name__ == "__main__":
|
26 |
main()
|