vinhvo1205 commited on
Commit
76007e9
·
verified ·
1 Parent(s): dea2cc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -10,7 +10,8 @@ with open("characters.json", "r", encoding="utf-8") as f:
10
  character_dict = {c["id"]: c for c in characters}
11
 
12
  # Hugging Face Inference API
13
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
14
 
15
  # Hàm phản hồi hội thoại
16
  def respond(message, history, character_id, max_tokens, temperature, top_p):
 
10
  character_dict = {c["id"]: c for c in characters}
11
 
12
  # Hugging Face Inference API
13
+ token = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
14
+ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=token)
15
 
16
  # Hàm phản hồi hội thoại
17
  def respond(message, history, character_id, max_tokens, temperature, top_p):