Spaces:
Runtime error
Runtime error
Commit
·
fecaa45
1
Parent(s):
4022606
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,12 +58,13 @@ if st.button("Process"):
|
|
| 58 |
columns = [x.lower() for x in columns]
|
| 59 |
df.columns = columns
|
| 60 |
print(summarizer_option)
|
| 61 |
-
try:
|
| 62 |
|
|
|
|
|
|
|
| 63 |
if summarizer_option == "Custom trained on the dataset":
|
| 64 |
model = custom_model()
|
| 65 |
print(summarizer_option)
|
| 66 |
-
|
| 67 |
progress_text = "Summarization in progress. Please wait."
|
| 68 |
summary = []
|
| 69 |
|
|
@@ -90,7 +91,6 @@ if st.button("Process"):
|
|
| 90 |
)
|
| 91 |
if summarizer_option == "t5-base":
|
| 92 |
model, tokenizer = load_t5()
|
| 93 |
-
text = df["text"].values.tolist()
|
| 94 |
summary = []
|
| 95 |
for x in stqdm(range(len(text))):
|
| 96 |
|
|
@@ -125,8 +125,6 @@ if st.button("Process"):
|
|
| 125 |
|
| 126 |
if summarizer_option == "t5-one-line-summary":
|
| 127 |
model = SimpleT5()
|
| 128 |
-
text = df["text"].values.tolist()
|
| 129 |
-
|
| 130 |
load_one_line_summarizer(model=model)
|
| 131 |
|
| 132 |
summary = []
|
|
|
|
| 58 |
columns = [x.lower() for x in columns]
|
| 59 |
df.columns = columns
|
| 60 |
print(summarizer_option)
|
|
|
|
| 61 |
|
| 62 |
+
try:
|
| 63 |
+
text = df["text"].values.tolist()
|
| 64 |
if summarizer_option == "Custom trained on the dataset":
|
| 65 |
model = custom_model()
|
| 66 |
print(summarizer_option)
|
| 67 |
+
|
| 68 |
progress_text = "Summarization in progress. Please wait."
|
| 69 |
summary = []
|
| 70 |
|
|
|
|
| 91 |
)
|
| 92 |
if summarizer_option == "t5-base":
|
| 93 |
model, tokenizer = load_t5()
|
|
|
|
| 94 |
summary = []
|
| 95 |
for x in stqdm(range(len(text))):
|
| 96 |
|
|
|
|
| 125 |
|
| 126 |
if summarizer_option == "t5-one-line-summary":
|
| 127 |
model = SimpleT5()
|
|
|
|
|
|
|
| 128 |
load_one_line_summarizer(model=model)
|
| 129 |
|
| 130 |
summary = []
|