Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def image_upload_and_ocr(reader):
|
|
51 |
# result2=result
|
52 |
texts = [item[1] for item in result2]
|
53 |
result=' '.join(texts)
|
54 |
-
return result
|
55 |
|
56 |
|
57 |
def query(payload):
|
@@ -98,12 +98,12 @@ def drawing_detection(image):
|
|
98 |
|
99 |
|
100 |
st.title("_Business_ card data extractor using opencv and streamlit :sunglasses:")
|
101 |
-
|
102 |
-
darwing_image=drawing_detection(
|
103 |
|
104 |
|
105 |
output = query({
|
106 |
-
"inputs":
|
107 |
})
|
108 |
|
109 |
entity_type,named_entities= get_ner_from_transformer(output)
|
|
|
51 |
# result2=result
|
52 |
texts = [item[1] for item in result2]
|
53 |
result=' '.join(texts)
|
54 |
+
return result2,result
|
55 |
|
56 |
|
57 |
def query(payload):
|
|
|
98 |
|
99 |
|
100 |
st.title("_Business_ card data extractor using opencv and streamlit :sunglasses:")
|
101 |
+
res2,res=image_upload_and_ocr(reader)
|
102 |
+
darwing_image=drawing_detection(res2)
|
103 |
|
104 |
|
105 |
output = query({
|
106 |
+
"inputs": res,
|
107 |
})
|
108 |
|
109 |
entity_type,named_entities= get_ner_from_transformer(output)
|