Update app.py
Browse files
app.py
CHANGED
@@ -592,10 +592,11 @@ def generate_report(title, summary):
|
|
592 |
print(f"Report generation error: {str(e)}")
|
593 |
return "๋ฆฌํฌํ
์์ฑ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค."
|
594 |
|
595 |
-
def toggle_report(
|
596 |
"""๋ฆฌํฌํธ ํ์/์จ๊น ํ ๊ธ"""
|
597 |
-
return not
|
598 |
|
|
|
599 |
css = """
|
600 |
footer {visibility: hidden;}
|
601 |
#status_area {
|
@@ -922,6 +923,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI ์๋น์ค") as
|
|
922 |
translated_query_display_global,
|
923 |
]
|
924 |
|
|
|
925 |
# AI ๋ฆฌํฌํฐ ํญ ์ด๋ฒคํธ ์ฐ๊ฒฐ
|
926 |
for comp in hn_article_components:
|
927 |
comp['report_button'].click(
|
@@ -932,7 +934,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI ์๋น์ค") as
|
|
932 |
|
933 |
comp['show_report'].click(
|
934 |
toggle_report,
|
935 |
-
inputs=[comp['report_content']
|
936 |
outputs=[comp['report_content']]
|
937 |
)
|
938 |
|
@@ -955,7 +957,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, title="NewsAI ์๋น์ค") as
|
|
955 |
|
956 |
|
957 |
|
958 |
-
|
959 |
iface.launch(
|
960 |
server_name="0.0.0.0",
|
961 |
server_port=7860,
|
|
|
592 |
print(f"Report generation error: {str(e)}")
|
593 |
return "๋ฆฌํฌํ
์์ฑ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค."
|
594 |
|
595 |
+
def toggle_report(report_content):
|
596 |
"""๋ฆฌํฌํธ ํ์/์จ๊น ํ ๊ธ"""
|
597 |
+
return gr.update(visible=not report_content.visible)
|
598 |
|
599 |
+
|
600 |
css = """
|
601 |
footer {visibility: hidden;}
|
602 |
#status_area {
|
|
|
923 |
translated_query_display_global,
|
924 |
]
|
925 |
|
926 |
+
|
927 |
# AI ๋ฆฌํฌํฐ ํญ ์ด๋ฒคํธ ์ฐ๊ฒฐ
|
928 |
for comp in hn_article_components:
|
929 |
comp['report_button'].click(
|
|
|
934 |
|
935 |
comp['show_report'].click(
|
936 |
toggle_report,
|
937 |
+
inputs=[comp['report_content']], # visible ์์ฑ ๋์ ์ปดํฌ๋ํธ ์์ฒด๋ฅผ ์ ๋ฌ
|
938 |
outputs=[comp['report_content']]
|
939 |
)
|
940 |
|
|
|
957 |
|
958 |
|
959 |
|
|
|
960 |
iface.launch(
|
961 |
server_name="0.0.0.0",
|
962 |
server_port=7860,
|