Sakalti commited on
Commit
75af0b2
·
verified ·
1 Parent(s): 702ce99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
- client = InferenceClient("Sakalti/model-3")
8
 
9
  TOKEN = os.environ["TOKEN"]
10
  def respond(
@@ -24,7 +24,9 @@ def respond(
24
  messages.append({"role": "assistant", "content": val[1]})
25
 
26
  messages.append({"role": "user", "content": message})
27
-
 
 
28
  # ストリーミングを無効にして、単一の応答を取得
29
  response = client.chat_completion(
30
  messages,
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
+ client = InferenceClient(api_key = TOKEN)
8
 
9
  TOKEN = os.environ["TOKEN"]
10
  def respond(
 
24
  messages.append({"role": "assistant", "content": val[1]})
25
 
26
  messages.append({"role": "user", "content": message})
27
+ completion = client.chat.completions.create(
28
+ model="Sakalti/model-3-decem",
29
+ messages=messages,
30
  # ストリーミングを無効にして、単一の応答を取得
31
  response = client.chat_completion(
32
  messages,