Update app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,11 @@ def classify_text(text):
|
|
16 |
|
17 |
return model.config.id2label[predicted_class_id]
|
18 |
|
19 |
-
uploaded_file = st.file_uploader("Upload Image", type= ['png', 'jpg'])
|
20 |
|
21 |
if uploaded_file is not None:
|
|
|
|
|
22 |
ocr_list = [x for x in pytesseract.image_to_string(uploaded_file).split("\n") if x != '']
|
23 |
ocr_class = [classify_text(x) for x in ocr_list]
|
24 |
idx = []
|
|
|
16 |
|
17 |
return model.config.id2label[predicted_class_id]
|
18 |
|
19 |
+
uploaded_file = st.file_uploader("Upload Image", type= ['png', 'jpeg', 'jpg'])
|
20 |
|
21 |
if uploaded_file is not None:
|
22 |
+
st.image(uploaded_file)
|
23 |
+
print(type(uploaded_file))
|
24 |
ocr_list = [x for x in pytesseract.image_to_string(uploaded_file).split("\n") if x != '']
|
25 |
ocr_class = [classify_text(x) for x in ocr_list]
|
26 |
idx = []
|