philipp-zettl commited on
Commit
31a57b6
·
verified ·
1 Parent(s): 085b760

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
6
  model_name = 'HuggingFaceTB/SmolLM-135M-Instruct'
7
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
8
- tokenizer = AutoTokenizer.from_pretrained(checkpoint)
9
- model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
10
 
11
  def respond(
12
  message,
 
5
 
6
  model_name = 'HuggingFaceTB/SmolLM-135M-Instruct'
7
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
8
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
9
+ model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
10
 
11
  def respond(
12
  message,