Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,10 +33,9 @@ if uploaded_file is not None:
|
|
33 |
user_input = st.text_area("Or paste your text here:")
|
34 |
text = user_input if user_input else text # Prioritize user input over file
|
35 |
|
36 |
-
def generate_text(model, input_texts, max_length=
|
37 |
# Convert input_texts to a list if it's a Dataset
|
38 |
-
|
39 |
-
input_texts = input_texts.to_list()
|
40 |
chunks = [input_texts[i:i+512] for i in range(0, len(input_texts), 512)]
|
41 |
#initialize an empty list to store summaries
|
42 |
summaries = []
|
|
|
33 |
user_input = st.text_area("Or paste your text here:")
|
34 |
text = user_input if user_input else text # Prioritize user input over file
|
35 |
|
36 |
+
def generate_text(model, input_texts, max_length=500, print_time_taken=False):
|
37 |
# Convert input_texts to a list if it's a Dataset
|
38 |
+
input_texts = input_texts.to_list()
|
|
|
39 |
chunks = [input_texts[i:i+512] for i in range(0, len(input_texts), 512)]
|
40 |
#initialize an empty list to store summaries
|
41 |
summaries = []
|