Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
@@ -25,7 +25,7 @@ qa_pipeline = pipeline(
|
|
25 |
emotion_model = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=1)
|
26 |
|
27 |
# === Brief Summarization ===
|
28 |
-
def summarize_review(text, max_len=
|
29 |
try:
|
30 |
result = summarizer(text, max_length=max_len, min_length=min_len, do_sample=False)
|
31 |
return result[0]["summary_text"]
|
|
|
25 |
emotion_model = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=1)
|
26 |
|
27 |
# === Brief Summarization ===
|
28 |
+
def summarize_review(text, max_len=100, min_len=30):
|
29 |
try:
|
30 |
result = summarizer(text, max_length=max_len, min_length=min_len, do_sample=False)
|
31 |
return result[0]["summary_text"]
|