joshuadunlop commited on
Commit
bc5df64
·
verified ·
1 Parent(s): a625ffd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -89,6 +89,11 @@ with col1:
89
  st.header("Input")
90
  target_url = st.text_input("Enter the target URL") # Define target_url here
91
 
 
 
 
 
 
92
  generate_button = st.sidebar.button("Generate All")
93
  reset_button = st.sidebar.button("Reset")
94
 
@@ -101,10 +106,8 @@ if generate_button and target_url:
101
  # Convert CSV to a string
102
  b64 = base64.b64encode(csv.encode()).decode()
103
  href = f'<a href="data:file/csv;base64,{b64}" download="backlinks.csv">Download CSV file</a>'
104
- with col2:
105
- st.header("Output")
106
- # Display the download link
107
- st.markdown(href, unsafe_allow_html=True)
108
 
109
  # Reset functionality
110
  if reset_button:
 
89
  st.header("Input")
90
  target_url = st.text_input("Enter the target URL") # Define target_url here
91
 
92
+ with col2:
93
+ st.header("Output")
94
+ # Placeholder for the download link
95
+ download_placeholder = st.empty()
96
+
97
  generate_button = st.sidebar.button("Generate All")
98
  reset_button = st.sidebar.button("Reset")
99
 
 
106
  # Convert CSV to a string
107
  b64 = base64.b64encode(csv.encode()).decode()
108
  href = f'<a href="data:file/csv;base64,{b64}" download="backlinks.csv">Download CSV file</a>'
109
+ # Display the download link in the placeholder
110
+ download_placeholder.markdown(href, unsafe_allow_html=True)
 
 
111
 
112
  # Reset functionality
113
  if reset_button: