Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -404,7 +404,25 @@ with gr.Blocks(title="Enhanced News Summarizer") as demo:
|
|
404 |
outputs=[preferences_output]
|
405 |
)
|
406 |
|
407 |
-
with gr.Tab("Get News Summary"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
|
409 |
|
410 |
|
|
|
404 |
outputs=[preferences_output]
|
405 |
)
|
406 |
|
407 |
+
with gr.Tab("Get News Summary"): name_check = gr.Textbox(label="Enter your name to get summary")
|
408 |
+
get_summary_button = gr.Button("Get Summary")
|
409 |
+
summary_output = gr.Textbox(
|
410 |
+
label="Your Personalized News Summary",
|
411 |
+
lines=20
|
412 |
+
)
|
413 |
+
|
414 |
+
get_summary_button.click(
|
415 |
+
get_personalized_summary,
|
416 |
+
inputs=[name_check],
|
417 |
+
outputs=[summary_output]
|
418 |
+
)
|
419 |
+
|
420 |
+
if __name__ == "__main__":
|
421 |
+
if initialize_models():
|
422 |
+
demo.launch()
|
423 |
+
else:
|
424 |
+
print("Failed to initialize summarizer. Please check the logs.")
|
425 |
+
|
426 |
|
427 |
|
428 |
|