Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
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)
|