Spaces:
Runtime error
Runtime error
Commit
·
a654a2c
1
Parent(s):
f58179a
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,8 @@ if file is not None:
|
|
38 |
df = pd.DataFrame.from_dict(textdic_easyocr).T
|
39 |
st.table(df)
|
40 |
|
41 |
-
# Plot image with text box and predicted text
|
|
|
42 |
for res in result:
|
43 |
top_left = tuple(res[0][0]) # top left coordinates as tuple
|
44 |
bottom_right = tuple(res[0][2]) # bottom right coordinates as tuple
|
|
|
38 |
df = pd.DataFrame.from_dict(textdic_easyocr).T
|
39 |
st.table(df)
|
40 |
|
41 |
+
# Plot image with text box and predicted text with cv2
|
42 |
+
image = cv2.imread(file)
|
43 |
for res in result:
|
44 |
top_left = tuple(res[0][0]) # top left coordinates as tuple
|
45 |
bottom_right = tuple(res[0][2]) # bottom right coordinates as tuple
|