Spaces:
Runtime error
Runtime error
import gradio as gr | |
from summarizer import summarize | |
with open("Example/File.txt", 'r', encoding="utf8") as f: | |
text = f.read() | |
sample = [text] | |
interface = gr.Interface(fn = summarize, | |
inputs = [gr.inputs.Textbox(lines=5, | |
placeholder="Enter your text...", | |
label='News Input'), | |
gr.inputs.Radio(["T5", "BART"], type="value", label='Model') | |
], | |
outputs = [gr.outputs.Textbox( | |
label="Sar")], | |
title = "Hindi News Summarizer", | |
examples=[sample]) | |
interface.launch(debug=True) |