openfree commited on
Commit
8ae4175
·
verified ·
1 Parent(s): b699057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -1099,7 +1099,18 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI 서비스") as
1099
  ]
1100
 
1101
  # AI 리포터 탭 이벤트 연결
 
1102
  for comp in hn_article_components:
 
 
 
 
 
 
 
 
 
 
1103
  comp['report_button'].click(
1104
  fn=generate_report,
1105
  inputs=[
@@ -1110,10 +1121,11 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI 서비스") as
1110
  comp['report_content'],
1111
  comp['show_report']
1112
  ],
1113
- api_name=f"generate_report_{comp['index']}", # 고유한 API 이름 추가
1114
  show_progress=True
1115
  )
1116
 
 
1117
  comp['show_report'].click(
1118
  fn=toggle_report,
1119
  inputs=[
@@ -1124,17 +1136,16 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI 서비스") as
1124
  comp['report_content'],
1125
  comp['show_report']
1126
  ],
1127
- api_name=f"toggle_report_{comp['index']}" # 고유한 API 이름 추가
1128
  )
1129
 
1130
-
1131
-
1132
  # 새로고침 버튼 이벤트 연결
1133
  refresh_button.click(
1134
  fn=refresh_hn_stories,
1135
  outputs=hn_outputs
1136
  )
1137
-
 
1138
 
1139
 
1140
 
 
1099
  ]
1100
 
1101
  # AI 리포터 탭 이벤트 연결
1102
+ hn_outputs = [status_message_hn]
1103
  for comp in hn_article_components:
1104
+ hn_outputs.extend([
1105
+ comp['group'],
1106
+ comp['title'],
1107
+ comp['info'],
1108
+ comp['report_button'],
1109
+ comp['report_content'],
1110
+ comp['show_report']
1111
+ ])
1112
+
1113
+ # 리포팅 생성 버튼 이벤트
1114
  comp['report_button'].click(
1115
  fn=generate_report,
1116
  inputs=[
 
1121
  comp['report_content'],
1122
  comp['show_report']
1123
  ],
1124
+ api_name=f"generate_report_{comp['index']}",
1125
  show_progress=True
1126
  )
1127
 
1128
+ # 펼쳐보기/접기 버튼 이벤트
1129
  comp['show_report'].click(
1130
  fn=toggle_report,
1131
  inputs=[
 
1136
  comp['report_content'],
1137
  comp['show_report']
1138
  ],
1139
+ api_name=f"toggle_report_{comp['index']}"
1140
  )
1141
 
 
 
1142
  # 새로고침 버튼 이벤트 연결
1143
  refresh_button.click(
1144
  fn=refresh_hn_stories,
1145
  outputs=hn_outputs
1146
  )
1147
+
1148
+
1149
 
1150
 
1151