ashleychen commited on
Commit
d284e46
·
1 Parent(s): 08f5884

add in US checkbox

Browse files
Files changed (1) hide show
  1. app.py +26 -25
app.py CHANGED
@@ -54,31 +54,32 @@ resources = """## Resources
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
- verified = gr.Radio(["True", "False"], label="user verified ")
66
- retweets = gr.inputs.Slider(minimum=0, maximum=10, step=1, default=0, label="# retweets")
67
- favourites = gr.inputs.Slider(minimum=0, maximum=5, step=1, default=0, label="# favourites")
68
- with gr.Row():
69
- button = gr.Button("Generate tweets !", elem_id='btn')
70
-
71
- with gr.Row():
72
- output1 = gr.Textbox(label="Review #1")
73
- output2 = gr.Textbox(label="Review #2")
74
- output3 = gr.Textbox(label="Review #3")
75
- output4 = gr.Textbox(label="Review #4")
76
- output5 = gr.Textbox(label="Review #5")
77
-
78
- with gr.Row():
79
- gr.Markdown(resources)
80
-
81
- button.click(
 
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]