Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,14 +48,14 @@ def search_endpoint(
|
|
48 |
|
49 |
def search_news_endpoint(
|
50 |
q: str,
|
51 |
-
num: int =
|
52 |
) -> dict:
|
53 |
"""
|
54 |
Search news articles, similar to Google News.
|
55 |
|
56 |
Args:
|
57 |
q: Search query
|
58 |
-
num: Number of results to return (default
|
59 |
|
60 |
Returns:
|
61 |
News search results as a dictionary
|
@@ -138,7 +138,7 @@ with gr.Blocks(title="Uplink") as demo:
|
|
138 |
with gr.Row():
|
139 |
with gr.Column():
|
140 |
news_query = gr.Textbox(label="News Search Query", placeholder="Type your news topic...")
|
141 |
-
news_num_results = gr.Slider(minimum=1, maximum=
|
142 |
news_search_btn = gr.Button("📰 Search News")
|
143 |
with gr.Column():
|
144 |
news_output = gr.JSON(label="News Results")
|
|
|
48 |
|
49 |
def search_news_endpoint(
|
50 |
q: str,
|
51 |
+
num: int = 5,
|
52 |
) -> dict:
|
53 |
"""
|
54 |
Search news articles, similar to Google News.
|
55 |
|
56 |
Args:
|
57 |
q: Search query
|
58 |
+
num: Number of results to return (default 5) [maximum of 5]
|
59 |
|
60 |
Returns:
|
61 |
News search results as a dictionary
|
|
|
138 |
with gr.Row():
|
139 |
with gr.Column():
|
140 |
news_query = gr.Textbox(label="News Search Query", placeholder="Type your news topic...")
|
141 |
+
news_num_results = gr.Slider(minimum=1, maximum=5, value=5, step=1, label="Number of Results")
|
142 |
news_search_btn = gr.Button("📰 Search News")
|
143 |
with gr.Column():
|
144 |
news_output = gr.JSON(label="News Results")
|