openfree commited on
Commit
40eeaea
·
verified ·
1 Parent(s): e40f945

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -921,21 +921,21 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI 서비스") as
921
  status_message_global,
922
  translated_query_display_global,
923
  ]
924
-
925
- for comp in global_article_components:
926
- global_search_outputs.extend([
927
- comp['group'], comp['title'], comp['image'],
928
- comp['snippet'], comp['info']
929
- ])
930
- global_search_outputs.append(articles_state_global)
931
-
932
- search_button_global.click(
933
- search_global,
934
- inputs=[query_global, articles_state_global],
935
- outputs=global_search_outputs
936
- )
937
 
938
  # AI 리포터 탭 이벤트 연결
 
 
 
 
 
 
 
 
 
 
 
 
 
939
  hn_outputs = [status_message_hn]
940
  for comp in hn_article_components:
941
  hn_outputs.extend([
@@ -950,8 +950,9 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI 서비스") as
950
  refresh_button.click(
951
  refresh_hn_stories,
952
  outputs=hn_outputs
953
- )
954
-
 
955
 
956
 
957
 
 
921
  status_message_global,
922
  translated_query_display_global,
923
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
924
 
925
  # AI 리포터 탭 이벤트 연결
926
+ for comp in hn_article_components:
927
+ comp['report_button'].click(
928
+ generate_report,
929
+ inputs=[comp['title'], comp['info']],
930
+ outputs=[comp['report_content'], comp['show_report']]
931
+ )
932
+
933
+ comp['show_report'].click(
934
+ toggle_report,
935
+ inputs=[comp['report_content'].visible],
936
+ outputs=[comp['report_content']]
937
+ )
938
+
939
  hn_outputs = [status_message_hn]
940
  for comp in hn_article_components:
941
  hn_outputs.extend([
 
950
  refresh_button.click(
951
  refresh_hn_stories,
952
  outputs=hn_outputs
953
+ )
954
+
955
+
956
 
957
 
958