cutiee82 commited on
Commit
9c9eb31
·
1 Parent(s): c7deb73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -13,12 +13,14 @@ def generate(text, length=100):
13
  def main():
14
  with gr.Blocks(title="🦊 textgen") as demo:
15
  gr.Markdown("# 🦊 textgen")
16
- with gr.Group():
17
- text = gr.Textbox(label="Text", lines=8)
18
- length = gr.Number(label="Length", value=25)
19
  with gr.Row():
20
- btn = gr.Button("Generate", variant="primary")
21
- clear_btn = gr.Button("Clear")
 
 
 
 
 
22
  btn.click(generate, [text, length], [text])
23
  clear_btn.click(lambda: gr.update(value=""), [], [text])
24
  demo.queue().launch(debug=True)
 
13
  def main():
14
  with gr.Blocks(title="🦊 textgen") as demo:
15
  gr.Markdown("# 🦊 textgen")
 
 
 
16
  with gr.Row():
17
+ with gr.Column():
18
+ with gr.Group():
19
+ text = gr.TextArea(label="Text")
20
+ length = gr.Number(label="Length", value=25)
21
+ with gr.Column():
22
+ btn = gr.Button("Generate", variant="primary")
23
+ clear_btn = gr.Button("Clear")
24
  btn.click(generate, [text, length], [text])
25
  clear_btn.click(lambda: gr.update(value=""), [], [text])
26
  demo.queue().launch(debug=True)