Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,11 @@ import gradio as gr
|
|
| 3 |
from transformers import pipeline
|
| 4 |
import csv
|
| 5 |
|
| 6 |
-
model_id = "pszemraj/long-t5-tglobal-base-16384-book-summary"
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
def summarize(text):
|
| 11 |
text = str(text)
|
|
|
|
| 3 |
from transformers import pipeline
|
| 4 |
import csv
|
| 5 |
|
| 6 |
+
#model_id = "pszemraj/long-t5-tglobal-base-16384-book-summary"
|
| 7 |
+
#summarizer = pipeline("summarization", model=model_id)
|
| 8 |
|
| 9 |
+
model_id = "google/flan-t5-large"
|
| 10 |
+
summarizer = pipeline("text2text-generation", model=model_id)
|
| 11 |
|
| 12 |
def summarize(text):
|
| 13 |
text = str(text)
|