Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ template = """<|im_start|>system
|
|
15 |
|
16 |
def generate(query, temp, top_p):
|
17 |
inputs = template.format(prompt=query)
|
18 |
-
inputs = tokenizer([
|
19 |
outputs = model.generate(
|
20 |
inputs=inputs.input_ids,
|
21 |
max_new_tokens=1024,
|
|
|
15 |
|
16 |
def generate(query, temp, top_p):
|
17 |
inputs = template.format(prompt=query)
|
18 |
+
inputs = tokenizer([inputs], return_tensors="pt").to(model.device)
|
19 |
outputs = model.generate(
|
20 |
inputs=inputs.input_ids,
|
21 |
max_new_tokens=1024,
|