def url_summarize(url,k): html = urllib.urlopen(url).read() smaller_html = Document(html).summary() soup = BeautifulSoup(smaller_html) document = soup.get_text() s = Summarizer() summary = s.summarize(document,summary_size) return summary
def url_summarize(url, k): html = urllib.urlopen(url).read() smaller_html = Document(html).summary() soup = BeautifulSoup(smaller_html) document = soup.get_text() s = Summarizer() summary = s.summarize(document, summary_size) return summary
def serve_summary(): text = request.form['input_text'] s = Summarizer() summary = s.summarize(text, 5) return render_template('summary.html', summary=summary)
def serve_summary(): text = request.form['input_text'] s = Summarizer() summary = s.summarize(text,5) return render_template('summary.html',summary=summary)