Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,11 +71,12 @@ def chat(id, npc, prompt):
|
|
71 |
# model inference
|
72 |
|
73 |
if check(model_name):
|
74 |
-
prom =
|
75 |
inputs = tokenizer(prom, return_tensors="pt")["input_ids"]
|
76 |
outputs = model.generate(inputs, max_new_tokens=100)
|
77 |
print(tokenizer.decode(outputs[0]))
|
78 |
output = outputs[len(prom):-1]
|
|
|
79 |
else:
|
80 |
output = "no model"
|
81 |
|
|
|
71 |
# model inference
|
72 |
|
73 |
if check(model_name):
|
74 |
+
prom = prompt
|
75 |
inputs = tokenizer(prom, return_tensors="pt")["input_ids"]
|
76 |
outputs = model.generate(inputs, max_new_tokens=100)
|
77 |
print(tokenizer.decode(outputs[0]))
|
78 |
output = outputs[len(prom):-1]
|
79 |
+
print(output)
|
80 |
else:
|
81 |
output = "no model"
|
82 |
|