philipp-zettl
commited on
Update app.py
Browse files
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(
|
9 |
-
model = AutoModelForCausalLM.from_pretrained(
|
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,
|