Spaces:
Runtime error
Runtime error
Commit
·
d284e46
1
Parent(s):
08f5884
add in US checkbox
Browse files
app.py
CHANGED
|
@@ -54,31 +54,32 @@ resources = """## Resources
|
|
| 54 |
demo = gr.Blocks(css=css)
|
| 55 |
|
| 56 |
with demo:
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
|
|
|
| 82 |
fn=generate_reviews,
|
| 83 |
inputs=[n_followers, n_friends, n_favourites, verified, retweets, favourites],
|
| 84 |
outputs=[output1, output2, output3, output4, output5]
|
|
|
|
| 54 |
demo = gr.Blocks(css=css)
|
| 55 |
|
| 56 |
with demo:
|
| 57 |
+
with gr.Row():
|
| 58 |
+
gr.Markdown(md_text)
|
| 59 |
+
|
| 60 |
+
with gr.Row():
|
| 61 |
+
n_followers = gr.inputs.Slider(minimum=0, maximum=2000, step=100, default=100, label="# user followers")
|
| 62 |
+
n_friends = gr.inputs.Slider(minimum=0, maximum=5000, step=100, default=2000, label="# user friends")
|
| 63 |
+
n_favourites = gr.inputs.Slider(minimum=0, maximum=5000, step=100, default=2000, label="# user favourites")
|
| 64 |
+
with gr.Row():
|
| 65 |
+
in_US = gr.Radio(["True", "False"], label="user location in US")
|
| 66 |
+
verified = gr.Radio(["True", "False"], label="user verified ✓")
|
| 67 |
+
retweets = gr.inputs.Slider(minimum=0, maximum=10, step=1, default=0, label="# retweets")
|
| 68 |
+
favourites = gr.inputs.Slider(minimum=0, maximum=5, step=1, default=0, label="# favourites")
|
| 69 |
+
with gr.Row():
|
| 70 |
+
button = gr.Button("Generate tweets !", elem_id='btn')
|
| 71 |
+
|
| 72 |
+
with gr.Row():
|
| 73 |
+
output1 = gr.Textbox(label="Review #1")
|
| 74 |
+
output2 = gr.Textbox(label="Review #2")
|
| 75 |
+
output3 = gr.Textbox(label="Review #3")
|
| 76 |
+
output4 = gr.Textbox(label="Review #4")
|
| 77 |
+
output5 = gr.Textbox(label="Review #5")
|
| 78 |
+
|
| 79 |
+
with gr.Row():
|
| 80 |
+
gr.Markdown(resources)
|
| 81 |
+
|
| 82 |
+
button.click(
|
| 83 |
fn=generate_reviews,
|
| 84 |
inputs=[n_followers, n_friends, n_favourites, verified, retweets, favourites],
|
| 85 |
outputs=[output1, output2, output3, output4, output5]
|