rahimizadeh commited on
Commit
9be32e4
·
verified ·
1 Parent(s): cbd7d88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -18,9 +18,14 @@ class TextSummarizer:
18
  model_id=self.model_id,
19
  task="summarization",
20
  pipeline_kwargs={
21
- "max_length": max_length,
22
- "min_length": min_length,
23
- "do_sample": False # Deterministic output
 
 
 
 
 
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