Spaces:
Running
Running
File size: 465 Bytes
531f4dd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from huggingface_hub import InferenceClient
import os
token = os.getenv("HF_TOKEN")
if not token:
print("Установи HF_TOKEN!")
exit()
client = InferenceClient(token=token)
messages = [{"role": "user", "content": "Решить 2+2=?"}]
response = client.chat_completion(
model="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
messages=messages,
max_tokens=50,
temperature=0.5
)
print("Ответ:", response.choices[0].message["content"]) |