Team Ai
Apppublic

AshishT/LanguageModel

sourceHugging Faceupdated 4y agoView on Hugging Face
0likes
app.py14 linesDownload Raw Back to root
1from transformers import pipeline2import gradio as gr3 4model = pipeline("summarization")5 6def predict(prompt):7    summary = model(prompt)[0]["summary_text"]8    return summary9 10with gr.Blocks() as demo:11    textbox = gr.Textbox(placeholder="Enter text block to summarize", lines=4)12    gr.Interface(fn=predict, inputs=textbox, outputs="text")13 14demo.launch(share=True)