mayf commited on
Commit
9359b84
·
verified ·
1 Parent(s): 63ef49e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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-like generation
10
- pipe = pipeline(
11
- "text-generation",
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
+