Update app.py
Browse files
app.py
CHANGED
@@ -576,38 +576,6 @@ def refresh_hn_stories():
|
|
576 |
])
|
577 |
|
578 |
yield final_outputs
|
579 |
-
|
580 |
-
# μ΅μ’
μν μ
λ°μ΄νΈ
|
581 |
-
final_outputs = [gr.update(value=f"μ΄ {len(processed_stories)}κ°μ ν¬μ€νΈκ° μ²λ¦¬λμμ΅λλ€.", visible=True)]
|
582 |
-
|
583 |
-
for idx, comp in enumerate(hn_article_components):
|
584 |
-
if idx < len(processed_stories):
|
585 |
-
story, summary = processed_stories[idx]
|
586 |
-
final_outputs.extend([
|
587 |
-
gr.update(visible=True),
|
588 |
-
gr.update(value=f"### [{story.get('title', 'Untitled')}]({story.get('url', '#')})"),
|
589 |
-
gr.update(value=f"""
|
590 |
-
**μμ±μ:** {story.get('by', 'unknown')} |
|
591 |
-
**μκ°:** {format_hn_time(story.get('time', 0))} |
|
592 |
-
**μ μ:** {story.get('score', 0)} |
|
593 |
-
**λκΈ:** {len(story.get('kids', []))}κ°\n
|
594 |
-
**AI μμ½:** {summary}
|
595 |
-
"""),
|
596 |
-
gr.update(visible=True), # report_button
|
597 |
-
gr.update(visible=False), # show_report
|
598 |
-
gr.update(visible=False) # report_content
|
599 |
-
])
|
600 |
-
else:
|
601 |
-
final_outputs.extend([
|
602 |
-
gr.update(visible=False),
|
603 |
-
gr.update(),
|
604 |
-
gr.update(),
|
605 |
-
gr.update(visible=False),
|
606 |
-
gr.update(visible=False),
|
607 |
-
gr.update(visible=False)
|
608 |
-
])
|
609 |
-
|
610 |
-
yield final_outputs
|
611 |
|
612 |
def generate_report(title, info, progress=gr.Progress()):
|
613 |
"""리ν¬ν
μμ±"""
|
|
|
576 |
])
|
577 |
|
578 |
yield final_outputs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
579 |
|
580 |
def generate_report(title, info, progress=gr.Progress()):
|
581 |
"""리ν¬ν
μμ±"""
|