netflypsb commited on
Commit
65483d1
·
verified ·
1 Parent(s): e3f7da8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -89,12 +89,13 @@ if uploaded_file:
89
  buffer = io.StringIO()
90
  df.to_csv(buffer, index=False)
91
  buffer.seek(0)
 
92
  st.success("New visit entry added successfully!")
93
 
94
  # Download button (moved outside the form)
95
  st.download_button(
96
  label="Download Updated Data",
97
- data=buffer,
98
  file_name="updated_patient_data.csv",
99
  mime="text/csv"
100
  )
@@ -154,12 +155,13 @@ if uploaded_file:
154
  buffer = io.StringIO()
155
  df.to_csv(buffer, index=False)
156
  buffer.seek(0)
 
157
  st.success("New patient account created successfully!")
158
 
159
  # Download button (moved outside the form)
160
  st.download_button(
161
  label="Download Updated Data",
162
- data=buffer,
163
  file_name="updated_patient_data.csv",
164
  mime="text/csv"
165
  )
 
89
  buffer = io.StringIO()
90
  df.to_csv(buffer, index=False)
91
  buffer.seek(0)
92
+ bytes_data = io.BytesIO(buffer.getvalue().encode('utf-8'))
93
  st.success("New visit entry added successfully!")
94
 
95
  # Download button (moved outside the form)
96
  st.download_button(
97
  label="Download Updated Data",
98
+ data=bytes_data,
99
  file_name="updated_patient_data.csv",
100
  mime="text/csv"
101
  )
 
155
  buffer = io.StringIO()
156
  df.to_csv(buffer, index=False)
157
  buffer.seek(0)
158
+ bytes_data = io.BytesIO(buffer.getvalue().encode('utf-8'))
159
  st.success("New patient account created successfully!")
160
 
161
  # Download button (moved outside the form)
162
  st.download_button(
163
  label="Download Updated Data",
164
+ data=bytes_data,
165
  file_name="updated_patient_data.csv",
166
  mime="text/csv"
167
  )