Spaces:
Sleeping
Sleeping
Jeff Myers II
commited on
Commit
·
5fba035
1
Parent(s):
d409176
Completed Prototype
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ with gr.Blocks() as demo:
|
|
| 28 |
|
| 29 |
gr.State({}), gr.State([]), gr.State({}),
|
| 30 |
|
| 31 |
-
gr.Slider(label="Number of Articles", minimum=1, maximum=10, value=
|
| 32 |
gr.Radio(label="Category (optional)", choices=news.__CATEGORIES__),
|
| 33 |
gr.Button("Get Articles"),
|
| 34 |
|
|
@@ -87,7 +87,7 @@ with gr.Blocks() as demo:
|
|
| 87 |
return num_headlines, category, get, headline, description, show, summarize, content, ready
|
| 88 |
|
| 89 |
def show_news(): ################################### Show news-related components
|
| 90 |
-
num_headlines = gr.Slider(label="Number of Articles", minimum=1, maximum=10, value=
|
| 91 |
category = gr.Radio(label="Category (optional)", choices=news.__CATEGORIES__, visible=True)
|
| 92 |
get = gr.Button("Get Articles", visible=True)
|
| 93 |
|
|
|
|
| 28 |
|
| 29 |
gr.State({}), gr.State([]), gr.State({}),
|
| 30 |
|
| 31 |
+
gr.Slider(label="Number of Articles", minimum=1, maximum=10, value=10, step=1),
|
| 32 |
gr.Radio(label="Category (optional)", choices=news.__CATEGORIES__),
|
| 33 |
gr.Button("Get Articles"),
|
| 34 |
|
|
|
|
| 87 |
return num_headlines, category, get, headline, description, show, summarize, content, ready
|
| 88 |
|
| 89 |
def show_news(): ################################### Show news-related components
|
| 90 |
+
num_headlines = gr.Slider(label="Number of Articles", minimum=1, maximum=10, value=10, step=1, visible=True)
|
| 91 |
category = gr.Radio(label="Category (optional)", choices=news.__CATEGORIES__, visible=True)
|
| 92 |
get = gr.Button("Get Articles", visible=True)
|
| 93 |
|