MicGuest
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,14 +2,10 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
|
4 |
|
5 |
-
model = pipeline(
|
6 |
-
"summarization",
|
7 |
-
)
|
8 |
|
9 |
def predict(prompt):
|
10 |
-
|
11 |
-
summarizer = pipeline(“summarization”, model=”t5-base”, tokenizer=”t5-base”, framework=”tf”)
|
12 |
-
summary=summarizer(context, max_length=130, min_length=60)
|
13 |
return summary
|
14 |
|
15 |
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
|
5 |
+
model = pipeline(“summarization”, model=”t5-base”, tokenizer=”t5-base”, framework=”tf”)
|
|
|
|
|
6 |
|
7 |
def predict(prompt):
|
8 |
+
summary = model(context, max_length=130, min_length=60)
|
|
|
|
|
9 |
return summary
|
10 |
|
11 |
|