Spaces:
Runtime error
Runtime error
Commit
·
d0316ac
1
Parent(s):
a57b498
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,8 +19,19 @@ def get_beam_output(sentence):
|
|
| 19 |
num_beams=5,
|
| 20 |
early_stopping=True
|
| 21 |
)
|
| 22 |
-
tokenizer.decode(beam_output[0], skip_special_tokens=True)
|
|
|
|
| 23 |
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
demo = gr.Interface(fn=get_beam_output, inputs="text", outputs="text")
|
| 26 |
demo.launch()
|
|
|
|
| 19 |
num_beams=5,
|
| 20 |
early_stopping=True
|
| 21 |
)
|
| 22 |
+
output=tokenizer.decode(beam_output[0], skip_special_tokens=True)
|
| 23 |
+
return output
|
| 24 |
|
| 25 |
|
| 26 |
+
txt1 = gr.Textbox(
|
| 27 |
+
label="Input",
|
| 28 |
+
lines=3,
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
txt2 = gr.Textbox(
|
| 32 |
+
label="Output",
|
| 33 |
+
lines=10,
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
demo = gr.Interface(fn=get_beam_output, inputs="text", outputs="text")
|
| 37 |
demo.launch()
|