Spaces:
Runtime error
Runtime error
Commit
·
0649739
1
Parent(s):
3a0c82d
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,20 @@
|
|
| 1 |
-
import easyocr
|
| 2 |
import PIL
|
| 3 |
from PIL import ImageDraw
|
| 4 |
import streamlit as st
|
| 5 |
|
|
|
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
reader = easyocr.Reader(['en'])
|
| 9 |
|
| 10 |
|
| 11 |
-
url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
|
| 12 |
-
img = Image.open(requests.get(url, stream=True).raw).convert("RGB")
|
| 13 |
-
bound = reader.readtext(img)
|
|
|
|
| 14 |
for i in range(len(bound)):
|
| 15 |
bb = bound[i]
|
| 16 |
left = bb[0][0][0]
|
|
@@ -18,4 +22,5 @@ for i in range(len(bound)):
|
|
| 18 |
right = bb[0][2][0]
|
| 19 |
bottom = bb[0][2][1]
|
| 20 |
st.text(f"bbox {left:.2f. right:.2f top:.2f bottom:.2f}")
|
|
|
|
| 21 |
|
|
|
|
| 1 |
+
#import easyocr
|
| 2 |
import PIL
|
| 3 |
from PIL import ImageDraw
|
| 4 |
import streamlit as st
|
| 5 |
|
| 6 |
+
import streamlit as st
|
| 7 |
|
| 8 |
+
x = st.slider('Select a value')
|
| 9 |
+
st.write(x, 'squared is', x * x)
|
| 10 |
|
| 11 |
+
#reader = easyocr.Reader(['en'])
|
| 12 |
|
| 13 |
|
| 14 |
+
#url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
|
| 15 |
+
#img = Image.open(requests.get(url, stream=True).raw).convert("RGB")
|
| 16 |
+
#bound = reader.readtext(img)
|
| 17 |
+
'''
|
| 18 |
for i in range(len(bound)):
|
| 19 |
bb = bound[i]
|
| 20 |
left = bb[0][0][0]
|
|
|
|
| 22 |
right = bb[0][2][0]
|
| 23 |
bottom = bb[0][2][1]
|
| 24 |
st.text(f"bbox {left:.2f. right:.2f top:.2f bottom:.2f}")
|
| 25 |
+
'''
|
| 26 |
|