Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,11 +12,12 @@ def main():
|
|
| 12 |
st.write('## Input')
|
| 13 |
uploaded_file = st.file_uploader('Upload the image file (PNG or JPG)', type=['png', 'jpg'], help='help')
|
| 14 |
input_file = st.file_uploader('Upload the input file (TXT)', type=['txt'], help='help')
|
|
|
|
| 15 |
|
| 16 |
if st.button('Find Order ID') and uploaded_file and input_file:
|
| 17 |
st.write('## Output')
|
| 18 |
model = tf.keras.models.load_model('model.h5')
|
| 19 |
-
result = find_order_id(uploaded_file, input_file, model)
|
| 20 |
if result['status'] == 'success':
|
| 21 |
st.success(result['message'])
|
| 22 |
elif result['status'] == 'warning':
|
|
|
|
| 12 |
st.write('## Input')
|
| 13 |
uploaded_file = st.file_uploader('Upload the image file (PNG or JPG)', type=['png', 'jpg'], help='help')
|
| 14 |
input_file = st.file_uploader('Upload the input file (TXT)', type=['txt'], help='help')
|
| 15 |
+
ocre = st.selectbox('OCR Engine', ['Hive', 'Tesseract'])
|
| 16 |
|
| 17 |
if st.button('Find Order ID') and uploaded_file and input_file:
|
| 18 |
st.write('## Output')
|
| 19 |
model = tf.keras.models.load_model('model.h5')
|
| 20 |
+
result = find_order_id(uploaded_file, input_file, model, ocre)
|
| 21 |
if result['status'] == 'success':
|
| 22 |
st.success(result['message'])
|
| 23 |
elif result['status'] == 'warning':
|