Update app.py
Browse filesMake file content editable
app.py
CHANGED
@@ -77,13 +77,9 @@ with tab1:
|
|
77 |
# File upload tab
|
78 |
with tab2:
|
79 |
uploaded_file = st.file_uploader('Choose a file', type='.txt')
|
80 |
-
|
81 |
-
if uploaded_file is not None:
|
82 |
-
text = uploaded_file.getvalue().decode('utf-8')
|
83 |
-
|
84 |
-
# Display file content
|
85 |
-
with st.container(border=True):
|
86 |
-
st.caption(f'File content')
|
87 |
-
st.write(text)
|
88 |
|
|
|
|
|
|
|
|
|
89 |
handle_input(text, 'tab2')
|
|
|
77 |
# File upload tab
|
78 |
with tab2:
|
79 |
uploaded_file = st.file_uploader('Choose a file', type='.txt')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
# Display file content
|
82 |
+
if uploaded_file is not None:
|
83 |
+
file_content = uploaded_file.getvalue().decode('utf-8')
|
84 |
+
text = st.text_area('File content', value=file_content, height=300)
|
85 |
handle_input(text, 'tab2')
|