Русский чат-бот ИИ на Hugging Face
Как запустить
- Установить зависимости:
pip install -r requirements.txt
- Запустить бота:
python app.py
Доступ через API
После развертывания на Hugging Face Space, используйте токен:
import requests
API_URL = "https://api-inference.huggingface.co/models/username/my_russian_ai"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
print(query({"inputs": "Привет, ИИ!"}))