Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import logging
|
2 |
import os
|
3 |
from huggingface_hub import InferenceClient
|
@@ -35,7 +36,7 @@ def generate_response(user_input):
|
|
35 |
|
36 |
response = hf_client.chat_completion(
|
37 |
model="CohereForAI/c4ai-command-r-plus",
|
38 |
-
|
39 |
max_tokens=1000,
|
40 |
stream=True,
|
41 |
temperature=0.7,
|
@@ -79,4 +80,4 @@ if __name__ == "__main__":
|
|
79 |
|
80 |
submit_button.click(chat_interface, [user_input, chatbot], [user_input, chatbot])
|
81 |
|
82 |
-
demo.launch()
|
|
|
1 |
+
# 추론 API 클라이언트 설정
|
2 |
import logging
|
3 |
import os
|
4 |
from huggingface_hub import InferenceClient
|
|
|
36 |
|
37 |
response = hf_client.chat_completion(
|
38 |
model="CohereForAI/c4ai-command-r-plus",
|
39 |
+
messages=messages,
|
40 |
max_tokens=1000,
|
41 |
stream=True,
|
42 |
temperature=0.7,
|
|
|
80 |
|
81 |
submit_button.click(chat_interface, [user_input, chatbot], [user_input, chatbot])
|
82 |
|
83 |
+
demo.launch(server_name="0.0.0.0", server_port=7861)
|