awacke1 commited on
Commit
62af43f
·
verified ·
1 Parent(s): f276ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -133,10 +133,11 @@ def show_file_operations(file_path, sequence_number):
133
  with col1:
134
  edit_key = f"edit_{unique_key}_{sequence_number}"
135
  if st.button(f"✏️ Edit", key=edit_key):
136
- with open(file_path, "r") as f:
137
- file_content = f.read()
138
- text_area_key = f"text_area_{unique_key}_{sequence_number}"
139
- file_content = st.text_area("Edit the file content:", value=file_content, height=250, key=text_area_key)
 
140
 
141
  with col2:
142
  save_key = f"save_{unique_key}_{sequence_number}"
 
133
  with col1:
134
  edit_key = f"edit_{unique_key}_{sequence_number}"
135
  if st.button(f"✏️ Edit", key=edit_key):
136
+ file_editor(file_path)
137
+ #with open(file_path, "r") as f:
138
+ # file_content = f.read()
139
+ #text_area_key = f"text_area_{unique_key}_{sequence_number}"
140
+ #file_content = st.text_area("Edit the file content:", value=file_content, height=250, key=text_area_key)
141
 
142
  with col2:
143
  save_key = f"save_{unique_key}_{sequence_number}"