Spaces:
Sleeping
Sleeping
push
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import InferenceClient
|
4 |
|
5 |
-
#
|
6 |
client = InferenceClient(os.getenv("HUGGINGFACE_TOKEN"))
|
7 |
|
8 |
def respond(
|
@@ -26,6 +26,7 @@ def respond(
|
|
26 |
response = ""
|
27 |
|
28 |
try:
|
|
|
29 |
for message in client.chat_completion(
|
30 |
model="sambanovasystems/SambaLingo-Russian-Chat",
|
31 |
messages=messages,
|
|
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import InferenceClient
|
4 |
|
5 |
+
# Используем токен из secrets
|
6 |
client = InferenceClient(os.getenv("HUGGINGFACE_TOKEN"))
|
7 |
|
8 |
def respond(
|
|
|
26 |
response = ""
|
27 |
|
28 |
try:
|
29 |
+
# Указываем модель
|
30 |
for message in client.chat_completion(
|
31 |
model="sambanovasystems/SambaLingo-Russian-Chat",
|
32 |
messages=messages,
|