Spaces:
Sleeping
Sleeping
Commit
·
0f9042b
1
Parent(s):
532bcab
Updated caching method and repo link on UI
Browse files
app.py
CHANGED
|
@@ -9,13 +9,13 @@ st.title("Easy OCR - Extract Text from Images")
|
|
| 9 |
#subtitle
|
| 10 |
st.markdown("## Optical Character Recognition - Using `easyocr`, `streamlit` - hosted on 🤗 Spaces")
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
#image uploader
|
| 15 |
image = st.file_uploader(label = "Upload your image here",type=['png','jpg','jpeg'])
|
| 16 |
|
| 17 |
|
| 18 |
-
@st.
|
| 19 |
def load_model():
|
| 20 |
reader = ocr.Reader(['en'],model_storage_directory='.')
|
| 21 |
return reader
|
|
|
|
| 9 |
#subtitle
|
| 10 |
st.markdown("## Optical Character Recognition - Using `easyocr`, `streamlit` - hosted on 🤗 Spaces")
|
| 11 |
|
| 12 |
+
st.markdown("Used Github Actions to automatically build the app on any updates on [this github repo link](https://github.com/deepanshu2207/imgtotext)")
|
| 13 |
|
| 14 |
#image uploader
|
| 15 |
image = st.file_uploader(label = "Upload your image here",type=['png','jpg','jpeg'])
|
| 16 |
|
| 17 |
|
| 18 |
+
@st.cache_resource
|
| 19 |
def load_model():
|
| 20 |
reader = ocr.Reader(['en'],model_storage_directory='.')
|
| 21 |
return reader
|