Spaces:
Runtime error
Runtime error
Commit
·
c4ff5e3
1
Parent(s):
6a6d358
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,22 +4,9 @@ from PIL import ImageDraw
|
|
| 4 |
import streamlit as st
|
| 5 |
import requests
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
st.
|
| 10 |
-
img = PIL.Image.open("google_image_sample.jpg")
|
| 11 |
-
|
| 12 |
-
print("fetched image")
|
| 13 |
-
reader = easyocr.Reader(['en'])
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
#url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
bound = reader.readtext(img)
|
| 20 |
-
print(bound)
|
| 21 |
-
print("Completed")
|
| 22 |
-
|
| 23 |
|
| 24 |
|
| 25 |
|
|
|
|
| 4 |
import streamlit as st
|
| 5 |
import requests
|
| 6 |
|
| 7 |
+
uploaded_file = st.file_uploader("text here", type="file_type")
|
| 8 |
+
image = Image.open(uploaded_file)
|
| 9 |
+
st.image(image, caption='Uploaded Image.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
|