Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -373,20 +373,22 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI ์๋น์ค") as
|
|
373 |
'index': i,
|
374 |
})
|
375 |
|
376 |
-
|
377 |
with gr.Tab("์ ์ธ๊ณ"):
|
378 |
gr.Markdown("๊ฒ์์ด๋ฅผ ์
๋ ฅํ๋ฉด 67๊ฐ๊ตญ์ 24์๊ฐ ์ด๋ด ๋ด์ค๋ฅผ ์ต๋ 1000๊ฐ ์ถ๋ ฅํฉ๋๋ค.")
|
379 |
-
|
380 |
with gr.Column():
|
381 |
with gr.Row():
|
382 |
query_global = gr.Textbox(label="๊ฒ์์ด")
|
383 |
search_button_global = gr.Button("์ ์ธ๊ณ ๊ฒ์", variant="primary")
|
384 |
-
|
385 |
with gr.Column(elem_id="status_area", visible=True):
|
386 |
status_message_global = gr.Markdown("")
|
|
|
387 |
progress_global = gr.Progress(track_tqdm=True)
|
388 |
-
|
389 |
gr.Markdown("---")
|
|
|
390 |
|
391 |
with gr.Column(elem_id="results_area"):
|
392 |
articles_state_global = gr.State([])
|
@@ -562,18 +564,19 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI ์๋น์ค") as
|
|
562 |
show_progress=True
|
563 |
)
|
564 |
|
|
|
565 |
global_search_outputs = [
|
566 |
status_message_global,
|
567 |
-
translated_query_display_global,
|
568 |
]
|
569 |
-
|
570 |
for comp in global_article_components:
|
571 |
global_search_outputs.extend([
|
572 |
comp['group'], comp['title'], comp['image'],
|
573 |
comp['snippet'], comp['info']
|
574 |
])
|
575 |
global_search_outputs.append(articles_state_global)
|
576 |
-
|
577 |
search_button_global.click(
|
578 |
search_global,
|
579 |
inputs=[query_global, articles_state_global],
|
|
|
373 |
'index': i,
|
374 |
})
|
375 |
|
376 |
+
# ์ ์ธ๊ณ ํญ ๋ถ๋ถ์ ๋ค์๊ณผ ๊ฐ์ด ์์
|
377 |
with gr.Tab("์ ์ธ๊ณ"):
|
378 |
gr.Markdown("๊ฒ์์ด๋ฅผ ์
๋ ฅํ๋ฉด 67๊ฐ๊ตญ์ 24์๊ฐ ์ด๋ด ๋ด์ค๋ฅผ ์ต๋ 1000๊ฐ ์ถ๋ ฅํฉ๋๋ค.")
|
379 |
+
|
380 |
with gr.Column():
|
381 |
with gr.Row():
|
382 |
query_global = gr.Textbox(label="๊ฒ์์ด")
|
383 |
search_button_global = gr.Button("์ ์ธ๊ณ ๊ฒ์", variant="primary")
|
384 |
+
|
385 |
with gr.Column(elem_id="status_area", visible=True):
|
386 |
status_message_global = gr.Markdown("")
|
387 |
+
translated_query_display_global = gr.Markdown("") # ์ด ์ค ์ถ๊ฐ
|
388 |
progress_global = gr.Progress(track_tqdm=True)
|
389 |
+
|
390 |
gr.Markdown("---")
|
391 |
+
|
392 |
|
393 |
with gr.Column(elem_id="results_area"):
|
394 |
articles_state_global = gr.State([])
|
|
|
564 |
show_progress=True
|
565 |
)
|
566 |
|
567 |
+
# global_search_outputs ๋ถ๋ถ์ ๋ค์๊ณผ ๊ฐ์ด ์์
|
568 |
global_search_outputs = [
|
569 |
status_message_global,
|
570 |
+
translated_query_display_global, # ์ด์ ์ ์๋ ์ปดํฌ๋ํธ ์ฌ์ฉ
|
571 |
]
|
572 |
+
|
573 |
for comp in global_article_components:
|
574 |
global_search_outputs.extend([
|
575 |
comp['group'], comp['title'], comp['image'],
|
576 |
comp['snippet'], comp['info']
|
577 |
])
|
578 |
global_search_outputs.append(articles_state_global)
|
579 |
+
|
580 |
search_button_global.click(
|
581 |
search_global,
|
582 |
inputs=[query_global, articles_state_global],
|