Paula Leonova
commited on
Commit
·
fa46014
1
Parent(s):
71541e6
Fix conditional statement for multiple text file uploader
Browse files
app.py
CHANGED
@@ -145,7 +145,7 @@ if submit_button or example_button:
|
|
145 |
###################################
|
146 |
######## Load Text Data #######
|
147 |
###################################
|
148 |
-
if len(text_input) == 0 and uploaded_text_files
|
149 |
st.error("Enter some text to generate a summary")
|
150 |
else:
|
151 |
|
@@ -153,7 +153,7 @@ if submit_button or example_button:
|
|
153 |
text_df = pd.DataFrame.from_dict({'title': [title_name], 'text': [text_input]})
|
154 |
|
155 |
# OPTION A
|
156 |
-
elif uploaded_text_files
|
157 |
st.markdown("### Text Inputs")
|
158 |
st.write('Files concatenated into a dataframe:')
|
159 |
file_names = []
|
|
|
145 |
###################################
|
146 |
######## Load Text Data #######
|
147 |
###################################
|
148 |
+
if len(text_input) == 0 and len(uploaded_text_files) == 0 and uploaded_csv_text_files is None:
|
149 |
st.error("Enter some text to generate a summary")
|
150 |
else:
|
151 |
|
|
|
153 |
text_df = pd.DataFrame.from_dict({'title': [title_name], 'text': [text_input]})
|
154 |
|
155 |
# OPTION A
|
156 |
+
elif len(uploaded_text_files) != 0:
|
157 |
st.markdown("### Text Inputs")
|
158 |
st.write('Files concatenated into a dataframe:')
|
159 |
file_names = []
|