Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ def analyze_reviews(uploaded_file):
|
|
| 51 |
try:
|
| 52 |
token_len = len(tokenizer(complaint)["input_ids"])
|
| 53 |
if token_len > 40:
|
| 54 |
-
summary = summarizer(complaint, max_length=
|
| 55 |
else:
|
| 56 |
summary = complaint
|
| 57 |
topic_result = zero_classifier(summary, candidate_labels)
|
|
|
|
| 51 |
try:
|
| 52 |
token_len = len(tokenizer(complaint)["input_ids"])
|
| 53 |
if token_len > 40:
|
| 54 |
+
summary = summarizer(complaint, max_length=50, min_length=15, do_sample=False)[0]["summary_text"]
|
| 55 |
else:
|
| 56 |
summary = complaint
|
| 57 |
topic_result = zero_classifier(summary, candidate_labels)
|