Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,14 +8,14 @@ from sklearn.feature_extraction.text import TfidfVectorizer
|
|
8 |
from sklearn.cluster import KMeans
|
9 |
from datetime import datetime, timedelta
|
10 |
import os
|
11 |
-
from huggingface_hub import
|
12 |
|
13 |
# ์ฌ๊ธฐ์ YouTube API ํค๋ฅผ ์
๋ ฅํ์ธ์
|
14 |
-
YOUTUBE_API_KEY = "
|
15 |
|
16 |
def create_client(model_name):
|
17 |
token = os.getenv("HF_TOKEN")
|
18 |
-
return
|
19 |
|
20 |
client = create_client("CohereForAI/c4ai-command-r-plus")
|
21 |
|
|
|
8 |
from sklearn.cluster import KMeans
|
9 |
from datetime import datetime, timedelta
|
10 |
import os
|
11 |
+
from huggingface_hub import InferenceClient # Hugging Face Hub API ์ฌ์ฉ
|
12 |
|
13 |
# ์ฌ๊ธฐ์ YouTube API ํค๋ฅผ ์
๋ ฅํ์ธ์
|
14 |
+
YOUTUBE_API_KEY = "YOUR_YOUTUBE_API_KEY"
|
15 |
|
16 |
def create_client(model_name):
|
17 |
token = os.getenv("HF_TOKEN")
|
18 |
+
return InferenceClient(model_name, token=token)
|
19 |
|
20 |
client = create_client("CohereForAI/c4ai-command-r-plus")
|
21 |
|