Spaces:
Runtime error
Runtime error
fix: image upload rewrites image
Browse files
app.py
CHANGED
|
@@ -80,15 +80,15 @@ with st.sidebar:
|
|
| 80 |
|
| 81 |
st.text(f'{information} mode is ON!\nTarget 🧾: {receipt}') # \n(opening image @:./img/receipt-{receipt}.png)')
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
col1, col2 = st.columns(2)
|
| 86 |
|
| 87 |
with col1:
|
| 88 |
-
|
| 89 |
-
st.image(image_upload, caption='Your target receipt')
|
| 90 |
-
else:
|
| 91 |
-
st.image(image, caption='Your target receipt')
|
| 92 |
|
| 93 |
st.text(f'baking the 🍩s...')
|
| 94 |
|
|
|
|
| 80 |
|
| 81 |
st.text(f'{information} mode is ON!\nTarget 🧾: {receipt}') # \n(opening image @:./img/receipt-{receipt}.png)')
|
| 82 |
|
| 83 |
+
if image_upload:
|
| 84 |
+
image = image_upload
|
| 85 |
+
else:
|
| 86 |
+
image = Image.open(f"./img/receipt-{receipt}.jpg")
|
| 87 |
|
| 88 |
col1, col2 = st.columns(2)
|
| 89 |
|
| 90 |
with col1:
|
| 91 |
+
st.image(image, caption='Your target receipt')
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
st.text(f'baking the 🍩s...')
|
| 94 |
|