Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ def rectangle(image, result):
|
|
| 20 |
# main title
|
| 21 |
st.title("Recognize text and locations from flowchart")
|
| 22 |
|
| 23 |
-
# subtitle
|
| 24 |
-
st.markdown("## FlowchartOCR")
|
| 25 |
|
| 26 |
# upload image file
|
| 27 |
file = st.file_uploader(label = "Upload Image", type=['png', 'jpg', 'jpeg'])
|
|
@@ -44,6 +44,7 @@ if file is not None:
|
|
| 44 |
pred_confidence = result[idx][2]
|
| 45 |
if(pred_confidence>0.6):
|
| 46 |
textdic_easyocr[pred_text] = {}
|
|
|
|
| 47 |
textdic_easyocr[pred_text]['pred_confidence'] = pred_confidence
|
| 48 |
|
| 49 |
# create a data frame which shows the predicted text and prediction confidence
|
|
|
|
| 20 |
# main title
|
| 21 |
st.title("Recognize text and locations from flowchart")
|
| 22 |
|
| 23 |
+
# # subtitle
|
| 24 |
+
# st.markdown("## FlowchartOCR")
|
| 25 |
|
| 26 |
# upload image file
|
| 27 |
file = st.file_uploader(label = "Upload Image", type=['png', 'jpg', 'jpeg'])
|
|
|
|
| 44 |
pred_confidence = result[idx][2]
|
| 45 |
if(pred_confidence>0.6):
|
| 46 |
textdic_easyocr[pred_text] = {}
|
| 47 |
+
textdic_easyocr[pred_text]['location'] = pred_coor
|
| 48 |
textdic_easyocr[pred_text]['pred_confidence'] = pred_confidence
|
| 49 |
|
| 50 |
# create a data frame which shows the predicted text and prediction confidence
|