Spaces:
Runtime error
Runtime error
Commit
·
d41195f
1
Parent(s):
3d64db0
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,13 @@ from PIL import ImageDraw
|
|
| 3 |
from PIL import Image
|
| 4 |
import streamlit as st
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
import os
|
| 7 |
os.system('pip install git+git://github.com/jaidedai/easyocr.git')
|
| 8 |
import easyocr
|
|
|
|
| 9 |
|
| 10 |
def load_image(image_file):
|
| 11 |
img = PIL.Image.open(image_file)
|
|
@@ -13,7 +17,7 @@ def load_image(image_file):
|
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
-
uploaded_file = st.file_uploader("
|
| 17 |
if uploaded_file is not None:
|
| 18 |
file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type,"FileSize":uploaded_file.size}
|
| 19 |
st.write(file_details)
|
|
|
|
| 3 |
from PIL import Image
|
| 4 |
import streamlit as st
|
| 5 |
|
| 6 |
+
|
| 7 |
+
display_area = st.empty()
|
| 8 |
+
display_area.text("Setting up environment. This will take some time")
|
| 9 |
import os
|
| 10 |
os.system('pip install git+git://github.com/jaidedai/easyocr.git')
|
| 11 |
import easyocr
|
| 12 |
+
display_area.text("Setting up Complete")
|
| 13 |
|
| 14 |
def load_image(image_file):
|
| 15 |
img = PIL.Image.open(image_file)
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
+
uploaded_file = st.file_uploader("Choose image file to detect text",type=['png','jpeg','jpg'])
|
| 21 |
if uploaded_file is not None:
|
| 22 |
file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type,"FileSize":uploaded_file.size}
|
| 23 |
st.write(file_details)
|