Spaces:
Paused
Paused
Younes Belkada
commited on
Commit
·
7012779
1
Parent(s):
7ebf2de
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def inference(text, seq_length=1):
|
|
| 29 |
|
| 30 |
final_tokens = torch.cat([final_tokens, next_token_ix.view(1, 1)], dim=-1)
|
| 31 |
input_ids = next_token_ix.view(1, 1)
|
| 32 |
-
return tokenizer.decode(final_tokens, skip_special_tokens=False)
|
| 33 |
|
| 34 |
iface = gr.Interface(fn=inference, inputs="text", outputs="text")
|
| 35 |
iface.launch()
|
|
|
|
| 29 |
|
| 30 |
final_tokens = torch.cat([final_tokens, next_token_ix.view(1, 1)], dim=-1)
|
| 31 |
input_ids = next_token_ix.view(1, 1)
|
| 32 |
+
return tokenizer.decode(final_tokens[0], skip_special_tokens=False)
|
| 33 |
|
| 34 |
iface = gr.Interface(fn=inference, inputs="text", outputs="text")
|
| 35 |
iface.launch()
|