Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from article_utils import extract_article_text, summarize_article | |
| from qa_utils import answer_question | |
| def summarize_from_url(url): | |
| try: | |
| text = extract_article_text(url) | |
| summary = summarize_article(text) | |
| return summary | |
| except Exception as e: | |
| return f"Error: {e}" | |
| demo = gr.Interface(fn=summarize_from_url, inputs="text", outputs="text", title="Article Summarizer") | |
| if __name__ == "__main__": | |
| demo.launch() | |