Newspaper / app.py
sudhir2016's picture
Update app.py
a18c6ec
raw
history blame
466 Bytes
import gradio as gr
import newspaper
from newspaper import Article
import nltk
nltk.download('punkt')
def art(url):
art=Article(url)
art.download()
art.parse()
art.nlp()
out=art.summary
return out
demo = gr.Interface(fn=art,inputs='text',outputs='text',examples= [['https://www.hindustantimes.com/technology/chatgpts-sam-altman-meets-pm-narendra-modi-discussed-artificial-intelligence-regulation-openai-ceo-in-india-101686223745661.html']])
demo.launch()