Update app.py
Browse files
app.py
CHANGED
|
@@ -12,14 +12,17 @@ except ImportError:
|
|
| 12 |
|
| 13 |
uploaded_file = st.file_uploader('Upload an image an equation',type=['png', 'jpg'],)
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
|
|
|
|
| 12 |
|
| 13 |
uploaded_file = st.file_uploader('Upload an image an equation',type=['png', 'jpg'],)
|
| 14 |
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
btn = st.button("بارگذاری")
|
| 18 |
+
if btn:
|
| 19 |
+
if uploaded_file is not None:
|
| 20 |
+
img = Image.open(uploaded_file)
|
| 21 |
+
st.image(img)
|
| 22 |
+
extractedInformation = pytesseract.image_to_string(img)
|
| 23 |
+
st.latex(extractedInformation)
|
| 24 |
+
else:
|
| 25 |
+
st.text("\n")
|
| 26 |
|
| 27 |
|
| 28 |
|