Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,9 +18,14 @@ class TextSummarizer:
|
|
18 |
model_id=self.model_id,
|
19 |
task="summarization",
|
20 |
pipeline_kwargs={
|
21 |
-
"max_length":
|
22 |
-
"
|
23 |
-
"
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
)
|
26 |
|
|
|
18 |
model_id=self.model_id,
|
19 |
task="summarization",
|
20 |
pipeline_kwargs={
|
21 |
+
"max_length": 250,
|
22 |
+
"do_sample": True,
|
23 |
+
"temperature": 0.7, # More creative
|
24 |
+
"top_k": 50, # Limit to top 50 tokens
|
25 |
+
"top_p": 0.95 # Use nucleus sampling
|
26 |
+
#"max_length": max_length,
|
27 |
+
#"min_length": min_length,
|
28 |
+
#"do_sample": False # Deterministic output
|
29 |
}
|
30 |
)
|
31 |
|