Correcting Demo
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def make_inference(product_name, product_description):
|
|
25 |
with torch.cuda.amp.autocast():
|
26 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
27 |
|
28 |
-
|
29 |
|
30 |
|
31 |
if __name__ == "__main__":
|
|
|
25 |
with torch.cuda.amp.autocast():
|
26 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
27 |
|
28 |
+
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
29 |
|
30 |
|
31 |
if __name__ == "__main__":
|