Spaces:
Runtime error
Runtime error
Added category and specific domain
Browse files* Adding the categories so that we can have a broader.
* changing the order of the options in the dropdown
app.py
CHANGED
@@ -60,8 +60,8 @@ def retrieve_news_per_keyword(api, keywords, domain):
|
|
60 |
|
61 |
response = api.news_api(
|
62 |
# domain=['bbc', 'forbes' , 'businessinsider_us'], # 'bbc', 'forbes' , 'businessinsider_us',
|
63 |
-
domainurl=
|
64 |
-
category='business' ,
|
65 |
# country = "us",
|
66 |
timeframe=48,
|
67 |
language = 'en',
|
@@ -519,7 +519,7 @@ with gr.Blocks() as demo:
|
|
519 |
# GRADIO ROW FOR NEWS COLLECTOR
|
520 |
with gr.Row():
|
521 |
with gr.Column(scale=1, min_width=600):
|
522 |
-
ui_domain = gr.Dropdown(["
|
523 |
retrieve_button = gr.Button("Retrieve news")
|
524 |
df_output = gr.Dataframe(type="pandas",wrap=True,label="News retrieved from the selected domain")
|
525 |
|
|
|
60 |
|
61 |
response = api.news_api(
|
62 |
# domain=['bbc', 'forbes' , 'businessinsider_us'], # 'bbc', 'forbes' , 'businessinsider_us',
|
63 |
+
domainurl=selected_domain_url, # 'bbc.com', 'forbes.com', 'businessinsider.com',
|
64 |
+
category=['business','technology' , 'politics'] ,
|
65 |
# country = "us",
|
66 |
timeframe=48,
|
67 |
language = 'en',
|
|
|
519 |
# GRADIO ROW FOR NEWS COLLECTOR
|
520 |
with gr.Row():
|
521 |
with gr.Column(scale=1, min_width=600):
|
522 |
+
ui_domain = gr.Dropdown(["forbes", "bbc", "businessinsider_us"], label="Select Domain")
|
523 |
retrieve_button = gr.Button("Retrieve news")
|
524 |
df_output = gr.Dataframe(type="pandas",wrap=True,label="News retrieved from the selected domain")
|
525 |
|