Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,11 @@ if uploaded_file is not None:
|
|
19 |
|
20 |
# Convert file to base64
|
21 |
b64 = base64.b64encode(file_content).decode()
|
22 |
-
st.markdown(f"File successfully uploaded. Here is the
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
# Modify app.py
|
26 |
new_code = f"# Modified by {username}\n"
|
|
|
19 |
|
20 |
# Convert file to base64
|
21 |
b64 = base64.b64encode(file_content).decode()
|
22 |
+
st.markdown(f"File successfully uploaded. Here is the download link:")
|
23 |
+
|
24 |
+
# Create a download link
|
25 |
+
href = f'<a href="data:file/txt;base64,{b64}" download="your_file.txt">Download File</a>'
|
26 |
+
st.markdown(href, unsafe_allow_html=True)
|
27 |
|
28 |
# Modify app.py
|
29 |
new_code = f"# Modified by {username}\n"
|