Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,12 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import tensorflow as tf
|
| 3 |
from button_click_alt import find_order_id
|
| 4 |
-
import cv2
|
| 5 |
-
import pandas as pd
|
| 6 |
-
import numpy as np
|
| 7 |
|
| 8 |
def main():
|
| 9 |
st.set_page_config(page_title='Order ID Finder', layout='wide')
|
| 10 |
st.title('OCR + Font type demo')
|
| 11 |
|
| 12 |
-
tabs = st.tabs(["Intro", "find order"
|
| 13 |
|
| 14 |
with tabs[0]:
|
| 15 |
col1, col2 = st.columns([1, 2])
|
|
@@ -56,19 +53,5 @@ def main():
|
|
| 56 |
elif result['status'] == 'warning':
|
| 57 |
st.warning(result['message'])
|
| 58 |
|
| 59 |
-
with tabs[2]:
|
| 60 |
-
st.write('## Preview')
|
| 61 |
-
if uploaded_file and input_file:
|
| 62 |
-
st.write('### Text File Contents')
|
| 63 |
-
# read input file into a variable before closing it
|
| 64 |
-
input_data = pd.read_csv(input_file)
|
| 65 |
-
st.write(input_data)
|
| 66 |
-
st.write('### Image Preview')
|
| 67 |
-
# read image file into a variable before closing it
|
| 68 |
-
img_bytes = uploaded_file.read()
|
| 69 |
-
img = cv2.imdecode(np.frombuffer(img_bytes, np.uint8), 1)
|
| 70 |
-
st.image(img, channels='BGR', caption='Uploaded Image')
|
| 71 |
-
|
| 72 |
-
|
| 73 |
if __name__ == '__main__':
|
| 74 |
-
main()
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import tensorflow as tf
|
| 3 |
from button_click_alt import find_order_id
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
def main():
|
| 6 |
st.set_page_config(page_title='Order ID Finder', layout='wide')
|
| 7 |
st.title('OCR + Font type demo')
|
| 8 |
|
| 9 |
+
tabs = st.tabs(["Intro", "find order"])
|
| 10 |
|
| 11 |
with tabs[0]:
|
| 12 |
col1, col2 = st.columns([1, 2])
|
|
|
|
| 53 |
elif result['status'] == 'warning':
|
| 54 |
st.warning(result['message'])
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
if __name__ == '__main__':
|
| 57 |
+
main()
|