Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
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):
|