File size: 447 Bytes
6a6eef6
 
 
 
 
 
 
 
 
 
 
 
9ab2240
6a6eef6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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/india-news/air-india-to-refund-full-amount-to-all-passengers-affected-by-delhi-san-francisco-flight-101686218402229.html']])
demo.launch()