Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,14 @@ from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassifica
|
|
6 |
from keybert import KeyBERT
|
7 |
|
8 |
# ─── DeepSeek Model Client ────────────────────────────────────────────────────
|
9 |
-
# Option 1: High-level helper pipeline for chat-
|
10 |
-
|
11 |
-
"
|
12 |
model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
|
13 |
trust_remote_code=True
|
14 |
)
|
15 |
|
16 |
-
# Option 2: Direct model & tokenizer instantiation (alternative)
|
17 |
# tokenizer_ds = AutoTokenizer.from_pretrained(
|
18 |
# "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
|
19 |
# trust_remote_code=True
|
@@ -137,3 +137,4 @@ Tasks:
|
|
137 |
|
138 |
if __name__ == "__main__":
|
139 |
main()
|
|
|
|
6 |
from keybert import KeyBERT
|
7 |
|
8 |
# ─── DeepSeek Model Client ────────────────────────────────────────────────────
|
9 |
+
# Option 1: High-level helper pipeline for chat-style generation
|
10 |
+
chat = pipeline(
|
11 |
+
"chat",
|
12 |
model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
|
13 |
trust_remote_code=True
|
14 |
)
|
15 |
|
16 |
+
# Option 2: Direct model & tokenizer instantiation (alternative) Direct model & tokenizer instantiation (alternative)
|
17 |
# tokenizer_ds = AutoTokenizer.from_pretrained(
|
18 |
# "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
|
19 |
# trust_remote_code=True
|
|
|
137 |
|
138 |
if __name__ == "__main__":
|
139 |
main()
|
140 |
+
|