Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def make_inference(product, description):
|
|
| 22 |
output_tokens = model.generate(**batch, max_new_tokens=200)
|
| 23 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
| 24 |
'''
|
| 25 |
-
def make_inference(
|
| 26 |
batch = tokenizer(f"### INSTRUCTION\nBelow is a product and description, please write a marketing email for this product.\n\n### Product:\n{product}\n### Description:\n{description}\n\n### Marketing Email:\n", return_tensors='pt')
|
| 27 |
|
| 28 |
batch = {key: value.to('cuda:0') for key, value in batch.items()}
|
|
|
|
| 22 |
output_tokens = model.generate(**batch, max_new_tokens=200)
|
| 23 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
| 24 |
'''
|
| 25 |
+
def make_inference(product, description):
|
| 26 |
batch = tokenizer(f"### INSTRUCTION\nBelow is a product and description, please write a marketing email for this product.\n\n### Product:\n{product}\n### Description:\n{description}\n\n### Marketing Email:\n", return_tensors='pt')
|
| 27 |
|
| 28 |
batch = {key: value.to('cuda:0') for key, value in batch.items()}
|