Update app.py
Browse files
app.py
CHANGED
|
@@ -97,15 +97,11 @@ def main():
|
|
| 97 |
with st.container():
|
| 98 |
c1, c2, c3 = st.columns([2,2,1])
|
| 99 |
message = c1.text_input("Type your text here!")
|
| 100 |
-
Capture=
|
| 101 |
if c2.button("Capture"):
|
| 102 |
-
Capture =
|
| 103 |
if c2.button("Stop Camera"):
|
| 104 |
Capture =False
|
| 105 |
-
if Capture:
|
| 106 |
-
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 107 |
-
if camera_photo:
|
| 108 |
-
st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
|
| 109 |
|
| 110 |
uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
| 111 |
if st.session_state["photo"]=="done" or message:
|
|
@@ -154,7 +150,7 @@ def main():
|
|
| 154 |
#text = pytesseract.image_to_string(img) if st.checkbox("Bangla") else pytesseract.image_to_string(img, lang="ben")
|
| 155 |
st.text("Select the summarization type:")
|
| 156 |
c6, c7 = st.columns([2,3])
|
| 157 |
-
st.
|
| 158 |
if c6.button("Bangla"):
|
| 159 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 160 |
st.subheader("সারাংশ/সারমর্ম")
|
|
|
|
| 97 |
with st.container():
|
| 98 |
c1, c2, c3 = st.columns([2,2,1])
|
| 99 |
message = c1.text_input("Type your text here!")
|
| 100 |
+
Capture=True
|
| 101 |
if c2.button("Capture"):
|
| 102 |
+
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 103 |
if c2.button("Stop Camera"):
|
| 104 |
Capture =False
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
uploaded_photo = c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state)
|
| 107 |
if st.session_state["photo"]=="done" or message:
|
|
|
|
| 150 |
#text = pytesseract.image_to_string(img) if st.checkbox("Bangla") else pytesseract.image_to_string(img, lang="ben")
|
| 151 |
st.text("Select the summarization type:")
|
| 152 |
c6, c7 = st.columns([2,3])
|
| 153 |
+
st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
|
| 154 |
if c6.button("Bangla"):
|
| 155 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 156 |
st.subheader("সারাংশ/সারমর্ম")
|