Spaces:
Runtime error
Runtime error
monicacherto
commited on
Commit
Β·
990c1a7
1
Parent(s):
7c364cd
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def make_inference(prompt):
|
|
17 |
batch = tokenizer(f"### Question:\n{prompt}: \n\n### Query", return_tensors='pt')
|
18 |
with torch.cuda.amp.autocast():
|
19 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
20 |
-
|
21 |
|
22 |
|
23 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
17 |
batch = tokenizer(f"### Question:\n{prompt}: \n\n### Query", return_tensors='pt')
|
18 |
with torch.cuda.amp.autocast():
|
19 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
20 |
+
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
21 |
|
22 |
|
23 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|