Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,13 @@ def show_file_operations(file_path):
|
|
| 61 |
|
| 62 |
col1, col2, col3 = st.columns(3)
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
with col2:
|
| 68 |
if st.button(f"💾 Save", key=f"save_{unique_key}_{unique_call_id}"):
|
|
|
|
| 61 |
|
| 62 |
col1, col2, col3 = st.columns(3)
|
| 63 |
|
| 64 |
+
with col1:
|
| 65 |
+
if st.button(f"✏️ Edit", key=f"edit_{unique_key}"):
|
| 66 |
+
file_content = ""
|
| 67 |
+
with open(file_path, "r") as f:
|
| 68 |
+
file_content = f.read()
|
| 69 |
+
file_content = st.text_area("Edit the file content:", value=file_content, height=250, key=f"text_area_{unique_key}")
|
| 70 |
+
|
| 71 |
|
| 72 |
with col2:
|
| 73 |
if st.button(f"💾 Save", key=f"save_{unique_key}_{unique_call_id}"):
|