frankrobotics commited on
Commit
fef6bc2
Β·
verified Β·
1 Parent(s): fa6f57e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -4,18 +4,15 @@ import torch
4
  from transformers import pipeline
5
 
6
  model_id = "deepseek-ai/DeepSeek-R1"
7
- pipe = pipeline(
8
- "text-generation",
9
- model=model_id,
10
- torch_dtype=torch.bfloat16,
11
- device_map="auto",
12
- trust_remote_code=True,
13
- )
14
  messages = [
15
- {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
16
  {"role": "user", "content": "Who are you?"},
17
  ]
 
18
 
 
 
 
 
19
 
20
  def model(params):
21
  outputs = pipe(
 
4
  from transformers import pipeline
5
 
6
  model_id = "deepseek-ai/DeepSeek-R1"
 
 
 
 
 
 
 
7
  messages = [
 
8
  {"role": "user", "content": "Who are you?"},
9
  ]
10
+ pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1", trust_remote_code=True)
11
 
12
+ messages = [
13
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
14
+ {"role": "user", "content": "Who are you?"},
15
+ ]
16
 
17
  def model(params):
18
  outputs = pipe(