Update app.py
Browse files
app.py
CHANGED
|
@@ -100,8 +100,8 @@ def main():
|
|
| 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 |
-
|
| 104 |
-
|
| 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:
|
|
@@ -133,7 +133,7 @@ def main():
|
|
| 133 |
img = cv2.imread("img.png")
|
| 134 |
st.text("Select the summarization type:")
|
| 135 |
st.success(text)
|
| 136 |
-
c4, c5 = st.columns([1,
|
| 137 |
if c4.button("BENGALI"):
|
| 138 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 139 |
st.subheader("সারাংশ/সারমর্ম")
|
|
@@ -150,7 +150,7 @@ def main():
|
|
| 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 |
st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
|
| 153 |
-
c6, c7 = st.columns([1,
|
| 154 |
if c6.button("Bangla"):
|
| 155 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 156 |
st.subheader("সারাংশ/সারমর্ম")
|
|
@@ -162,7 +162,7 @@ def main():
|
|
| 162 |
else:
|
| 163 |
text=None
|
| 164 |
text = message
|
| 165 |
-
c8, c9 = st.columns([1,
|
| 166 |
if c8.button("Bangla"):
|
| 167 |
bansum(text)
|
| 168 |
if c9.button("English"):
|
|
|
|
| 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:
|
|
|
|
| 133 |
img = cv2.imread("img.png")
|
| 134 |
st.text("Select the summarization type:")
|
| 135 |
st.success(text)
|
| 136 |
+
c4, c5 = st.columns([1,7])
|
| 137 |
if c4.button("BENGALI"):
|
| 138 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 139 |
st.subheader("সারাংশ/সারমর্ম")
|
|
|
|
| 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 |
st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
|
| 153 |
+
c6, c7 = st.columns([1,7])
|
| 154 |
if c6.button("Bangla"):
|
| 155 |
text = pytesseract.image_to_string(img, lang="ben")
|
| 156 |
st.subheader("সারাংশ/সারমর্ম")
|
|
|
|
| 162 |
else:
|
| 163 |
text=None
|
| 164 |
text = message
|
| 165 |
+
c8, c9 = st.columns([1,7])
|
| 166 |
if c8.button("Bangla"):
|
| 167 |
bansum(text)
|
| 168 |
if c9.button("English"):
|