Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
main.py
CHANGED
@@ -100,7 +100,7 @@ def predict(message: str, history: list[str]) -> str:
|
|
100 |
tokenize=False,
|
101 |
add_generation_prompt=True
|
102 |
)
|
103 |
-
model_inputs = tokenizer([text], return_tensors="pt")
|
104 |
|
105 |
generate_kwargs = dict(
|
106 |
model_inputs,
|
|
|
100 |
tokenize=False,
|
101 |
add_generation_prompt=True
|
102 |
)
|
103 |
+
model_inputs = tokenizer([text], return_tensors="pt").to("cuda:0")
|
104 |
|
105 |
generate_kwargs = dict(
|
106 |
model_inputs,
|