anzorq commited on
Commit
fe57abb
1 Parent(s): 28ca550
Files changed (2) hide show
  1. .vscode/settings.json +3 -0
  2. app.py +3 -3
.vscode/settings.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "python.formatting.provider": "yapf"
3
+ }
app.py CHANGED
@@ -23,9 +23,9 @@ def translate(text, num_beams=4, num_return_sequences=4):
23
  return "\n".join(["• " + translation for translation in translations])
24
 
25
  output = gr.outputs.Textbox()
26
- with gr.Accordion("Advanced Options"):
27
- num_beams = gr.inputs.Slider(2, 10, step=1, label="Number of beams", default=4)
28
- num_return_sequences = gr.inputs.Slider(2, 10, step=1, label="Number of returned sequences", default=4)
29
  iface = gr.Interface(fn=translate, inputs=["text", num_beams, num_return_sequences], outputs=output)
30
  iface.launch()
31
 
 
23
  return "\n".join(["• " + translation for translation in translations])
24
 
25
  output = gr.outputs.Textbox()
26
+ # with gr.Accordion("Advanced Options"):
27
+ num_beams = gr.inputs.Slider(2, 10, step=1, label="Number of beams", default=4)
28
+ num_return_sequences = gr.inputs.Slider(2, 10, step=1, label="Number of returned sequences", default=4)
29
  iface = gr.Interface(fn=translate, inputs=["text", num_beams, num_return_sequences], outputs=output)
30
  iface.launch()
31