File size: 447 Bytes
bc925c7
 
 
d5b4e6e
4773bf7
bc925c7
 
 
d5b4e6e
bc925c7
ea0860b
 
 
d5b4e6e
bc925c7
 
 
 
 
 
ea0860b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from transformers import pipeline
import gradio as gr

<<<<<<< HEAD
# I add a comt
# Initialize the summarization model
model = pipeline("summarization")

=======

model = pipeline(
    "summarization",
)
>>>>>>> refs/remotes/origin/main

def predict(prompt):
    summary = model(prompt)[0]["summary_text"]
    return summary


# create an interface for the model
with gr.Interface(predict, "textbox", "text") as interface:
    interface.launch()