Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -269,7 +269,7 @@ if 'selected_file' not in st.session_state:
|
|
269 |
st.session_state.selected_file = None
|
270 |
|
271 |
# Check if a new row is selected
|
272 |
-
if selected_indices:
|
273 |
selected_index = list(selected_indices.keys())[0]
|
274 |
selected_file = txt_files_df.iloc[selected_index]['File Name']
|
275 |
|
@@ -284,5 +284,7 @@ if st.session_state.selected_file:
|
|
284 |
if st.button(f"Process {st.session_state.selected_file}"):
|
285 |
file_path = txt_files_df[txt_files_df['File Name'] == st.session_state.selected_file]['Full Path'].iloc[0]
|
286 |
process_file(file_path)
|
|
|
|
|
287 |
|
288 |
st.markdown("For more information and updates, visit our [help page](https://huggingface.co/awacke1).")
|
|
|
269 |
st.session_state.selected_file = None
|
270 |
|
271 |
# Check if a new row is selected
|
272 |
+
if selected_indices and not selected_indices.empty:
|
273 |
selected_index = list(selected_indices.keys())[0]
|
274 |
selected_file = txt_files_df.iloc[selected_index]['File Name']
|
275 |
|
|
|
284 |
if st.button(f"Process {st.session_state.selected_file}"):
|
285 |
file_path = txt_files_df[txt_files_df['File Name'] == st.session_state.selected_file]['Full Path'].iloc[0]
|
286 |
process_file(file_path)
|
287 |
+
else:
|
288 |
+
st.write("Please select a file to process.")
|
289 |
|
290 |
st.markdown("For more information and updates, visit our [help page](https://huggingface.co/awacke1).")
|