diff --git a/webui.py b/webui.py new file mode 100644 index 0000000..ea1b2f6 --- /dev/null +++ b/webui.py @@ -0,0 +1,20 @@ +import gradio as gr +from summarizer import setup_summarization_chain, load_document + + +def summarize(url): + docs = load_document(url) + llm_chain = setup_summarization_chain() + result = llm_chain.run(docs) + return result + + +iface = gr.Interface( + fn=summarize, + inputs="text", + outputs="text", + title="Summarizer", + description="Enter a URL to get a summary of the document.", +) + +iface.launch()