joinportiko commited on
Commit
1461437
β€’
1 Parent(s): 24b75eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -57,7 +57,7 @@ def extract_journals(records):
57
  # Function to generate a summary using the Hugging Face model
58
  def generate_summary(abstract):
59
  max_length = min(1024, len(abstract)) # Adjust max_length based on the abstract length
60
- summary = summarizer(abstract[:max_length], max_length=50, min_length=30, do_sample=False)
61
  return summary[0]['summary_text']
62
 
63
  # Streamlit app
 
57
  # Function to generate a summary using the Hugging Face model
58
  def generate_summary(abstract):
59
  max_length = min(1024, len(abstract)) # Adjust max_length based on the abstract length
60
+ summary = summarizer(abstract[:max_length], max_length=80, min_length=40, do_sample=False)
61
  return summary[0]['summary_text']
62
 
63
  # Streamlit app