Update app.py
Browse files
app.py
CHANGED
|
@@ -424,7 +424,7 @@ def extract_text_from_unstract(uploaded_file):
|
|
| 424 |
"Content-Type": content_type,
|
| 425 |
}
|
| 426 |
url = f"{UNSTRACT_BASE}/whisper"
|
| 427 |
-
with st.spinner("Uploading and processing document with
|
| 428 |
r = requests.post(url, headers=headers, data=file_bytes)
|
| 429 |
if r.status_code != 202:
|
| 430 |
st.error(f"Unstract: Error uploading file: {r.status_code} - {r.text}")
|
|
@@ -443,7 +443,7 @@ def extract_text_from_unstract(uploaded_file):
|
|
| 443 |
return None
|
| 444 |
status = status_r.json().get("status")
|
| 445 |
if status == "processed":
|
| 446 |
-
status_placeholder.info("
|
| 447 |
break
|
| 448 |
status_placeholder.info(f"Unstract status: {status or 'waiting'}... ({i+1})")
|
| 449 |
time.sleep(2)
|
|
|
|
| 424 |
"Content-Type": content_type,
|
| 425 |
}
|
| 426 |
url = f"{UNSTRACT_BASE}/whisper"
|
| 427 |
+
with st.spinner("Uploading and processing document with EZOFIS AI OCR AGENT..."):
|
| 428 |
r = requests.post(url, headers=headers, data=file_bytes)
|
| 429 |
if r.status_code != 202:
|
| 430 |
st.error(f"Unstract: Error uploading file: {r.status_code} - {r.text}")
|
|
|
|
| 443 |
return None
|
| 444 |
status = status_r.json().get("status")
|
| 445 |
if status == "processed":
|
| 446 |
+
status_placeholder.info("EZOFIS AI OCR AGENT STATUS: processed! 🎉")
|
| 447 |
break
|
| 448 |
status_placeholder.info(f"Unstract status: {status or 'waiting'}... ({i+1})")
|
| 449 |
time.sleep(2)
|