digitalai commited on
Commit
5ca46a3
·
1 Parent(s): 00f7b73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
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
- if uploaded_file is not None:
16
- img = Image.open(uploaded_file)
17
- st.image(img)
18
- else:
19
- st.text('\n')
20
-
21
- extractedInformation = pytesseract.image_to_string(img)
22
- st.latex(extractedInformation)
 
 
 
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