fixed bug
Browse files
app.py
CHANGED
@@ -250,7 +250,7 @@ with st.container():
|
|
250 |
headers = {'Content-Type': 'application/json'}
|
251 |
response = requests.get(RESPONSE_TXT_API,data=json_data, headers=headers)
|
252 |
response_data = json.loads(response.text)
|
253 |
-
|
254 |
json_str =response_data.get("json")
|
255 |
|
256 |
# Encode this JSON string to bytes, which is required for the download
|
@@ -261,6 +261,6 @@ with st.container():
|
|
261 |
file_name="results.json",
|
262 |
mime="application/json"
|
263 |
)
|
264 |
-
|
265 |
st.error("Error in processing document")
|
266 |
|
|
|
250 |
headers = {'Content-Type': 'application/json'}
|
251 |
response = requests.get(RESPONSE_TXT_API,data=json_data, headers=headers)
|
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
|
|
|
261 |
file_name="results.json",
|
262 |
mime="application/json"
|
263 |
)
|
264 |
+
else:
|
265 |
st.error("Error in processing document")
|
266 |
|