File size: 684 Bytes
af59f74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Русский чат-бот ИИ на Hugging Face

## Как запустить
1. Установить зависимости:
```
pip install -r requirements.txt
```
2. Запустить бота:
```
python app.py
```

## Доступ через API
После развертывания на Hugging Face Space, используйте токен:
```python
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": "Привет, ИИ!"}))
```