Update app.py
Browse files
app.py
CHANGED
@@ -252,9 +252,9 @@ with st.container():
|
|
252 |
response_data = json.loads(response.text)
|
253 |
if response_data.get('status')=='success':
|
254 |
json_str =response_data.get("json")
|
255 |
-
|
256 |
# Encode this JSON string to bytes, which is required for the download
|
257 |
-
json_bytes =
|
258 |
st.download_button(
|
259 |
label="Download JSON",
|
260 |
data=json_bytes,
|
|
|
252 |
response_data = json.loads(response.text)
|
253 |
if response_data.get('status')=='success':
|
254 |
json_str =response_data.get("json")
|
255 |
+
json_formatted_str = json.dumps(json_str) # Convert list to JSON formatted string
|
256 |
# Encode this JSON string to bytes, which is required for the download
|
257 |
+
json_bytes = json_formatted_str.encode('utf-8')
|
258 |
st.download_button(
|
259 |
label="Download JSON",
|
260 |
data=json_bytes,
|