jm12138 commited on
Commit
5884d2f
1 Parent(s): f2a7319
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -161,13 +161,11 @@ with block:
161
  </div>
162
  """
163
  )
164
- with gr.Group():
165
- with gr.Group():
166
- text = gr.Textbox(
167
- label="input_text",
168
- placeholder="Please enter Chinese text.",
169
- )
170
- btn = gr.Button(value="Generate text")
171
  task = gr.Dropdown(label="task",
172
  choices=[
173
  'text_summarization',
@@ -190,6 +188,7 @@ with block:
190
  minimum=1.0, maximum=2.0, value=1.0, label="penalty_score", step=0.01, interactive=True)
191
 
192
  text_gen = gr.Textbox(label="generated_text")
 
193
 
194
  ex = gr.Examples(examples=examples, fn=inference, inputs=[
195
  task, text, min_dec_len, seq_len, topp, penalty_score], outputs=text_gen, cache_examples=False)
 
161
  </div>
162
  """
163
  )
164
+ with gr.Blocks():
165
+ text = gr.Textbox(
166
+ label="input_text",
167
+ placeholder="Please enter Chinese text.",
168
+ )
 
 
169
  task = gr.Dropdown(label="task",
170
  choices=[
171
  'text_summarization',
 
188
  minimum=1.0, maximum=2.0, value=1.0, label="penalty_score", step=0.01, interactive=True)
189
 
190
  text_gen = gr.Textbox(label="generated_text")
191
+ btn = gr.Button(value="Generate text")
192
 
193
  ex = gr.Examples(examples=examples, fn=inference, inputs=[
194
  task, text, min_dec_len, seq_len, topp, penalty_score], outputs=text_gen, cache_examples=False)