Spaces:
Sleeping
Sleeping
joinportiko
commited on
Commit
β’
1461437
1
Parent(s):
24b75eb
Update app.py
Browse files
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=
|
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
|