jm12138 commited on
Commit
277d86c
1 Parent(s): 2bd1abe
Files changed (1) hide show
  1. app.py +7 -16
app.py CHANGED
@@ -171,21 +171,12 @@ with block:
171
  """
172
  )
173
  with gr.Group():
174
- with gr.Box():
175
- with gr.Row().style(mobile_collapse=False, equal_height=True):
176
- text = gr.Textbox(
177
- label="input_text",
178
- max_lines=1,
179
- placeholder="Enter your Chinese prompt",
180
- ).style(
181
- border=(True, False, True, True),
182
- rounded=(True, False, False, True),
183
- container=False,
184
- )
185
- btn = gr.Button("Generate text").style(
186
- margin=False,
187
- rounded=(False, True, True, False),
188
- )
189
  task = gr.Dropdown(label="task",
190
  choices=[
191
  'text_summarization',
@@ -203,7 +194,7 @@ with block:
203
  topp = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, label="topp", step=0.01, interactive=True)
204
  penalty_score = gr.Slider(minimum=1.0, maximum=2.0, value=1.0, label="penalty_score", step=0.01, interactive=True)
205
 
206
- text_gen = gr.Text(label="generated_text")
207
 
208
  ex = gr.Examples(examples=examples, fn=inference, inputs=[task, text, min_dec_len, seq_len, topp, penalty_score], outputs=text_gen, cache_examples=False)
209
 
 
171
  """
172
  )
173
  with gr.Group():
174
+ text = gr.Textbox(
175
+ label="input_text",
176
+ max_lines=1,
177
+ placeholder="Enter your Chinese prompt",
178
+ )
179
+ btn = gr.Button("Generate text")
 
 
 
 
 
 
 
 
 
180
  task = gr.Dropdown(label="task",
181
  choices=[
182
  'text_summarization',
 
194
  topp = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, label="topp", step=0.01, interactive=True)
195
  penalty_score = gr.Slider(minimum=1.0, maximum=2.0, value=1.0, label="penalty_score", step=0.01, interactive=True)
196
 
197
+ text_gen = gr.Textbox(label="generated_text")
198
 
199
  ex = gr.Examples(examples=examples, fn=inference, inputs=[task, text, min_dec_len, seq_len, topp, penalty_score], outputs=text_gen, cache_examples=False)
200