Spaces:
Runtime error
Runtime error
File size: 467 Bytes
0475639 67cea0c 0475639 3489fcc 1bdcba6 0475639 84147f0 0475639 6c33ed3 0475639 67cea0c 1bdcba6 67cea0c 3489fcc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import gradio as gr
from transformers import pipeline
#Summarize
def greet(name):
return "Hello "+name + " abc"
#get_completion = pipeline('summarization',model='sshleifer/distilbart-cnn-12-6')
get_completion = pipeline('summarization',model='google/flan-t5-base')
def summarize(input):
output = get_completion(input)
return "Summary : " + output[0]['summary_text']
iface = gr.Interface(fn=summarize, inputs = "text",outputs='text')
iface.launch()
|