Ezinwanne Aka
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
-
model = pipeline(
|
|
|
|
|
5 |
|
6 |
def predict(prompt):
|
7 |
-
summary = model(prompt)[0][
|
8 |
return summary
|
9 |
|
10 |
with gr.Interface(predict, "textbox", "text") as interface:
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
+
model = pipeline(
|
5 |
+
"summarization",
|
6 |
+
)
|
7 |
|
8 |
def predict(prompt):
|
9 |
+
summary = model(prompt)[0]["summary_text"]
|
10 |
return summary
|
11 |
|
12 |
with gr.Interface(predict, "textbox", "text") as interface:
|