Update app.py
Browse files
app.py
CHANGED
|
@@ -94,8 +94,8 @@ def main():
|
|
| 94 |
def change_photo_state():
|
| 95 |
st.session_state["photo"]="done"
|
| 96 |
with st.container():
|
| 97 |
-
c2, c3 = st.columns([
|
| 98 |
-
message = st.text_input("Type your text here!")
|
| 99 |
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 100 |
uploaded_photo = save(c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state))
|
| 101 |
if st.session_state["photo"]=="done" or message:
|
|
@@ -192,6 +192,10 @@ def main():
|
|
| 192 |
from copyreg import clear_extension_cache
|
| 193 |
for chat in st.session_state.history:
|
| 194 |
st_message(**chat)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
|
| 197 |
if __name__ == "__main__":
|
|
|
|
| 94 |
def change_photo_state():
|
| 95 |
st.session_state["photo"]="done"
|
| 96 |
with st.container():
|
| 97 |
+
c1, c2, c3 = st.columns([2,2,1])
|
| 98 |
+
message = c1.st.text_input("Type your text here!")
|
| 99 |
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 100 |
uploaded_photo = save(c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state))
|
| 101 |
if st.session_state["photo"]=="done" or message:
|
|
|
|
| 192 |
from copyreg import clear_extension_cache
|
| 193 |
for chat in st.session_state.history:
|
| 194 |
st_message(**chat)
|
| 195 |
+
if st.button("Refresh/New Chat"):
|
| 196 |
+
st.session_state.history = []
|
| 197 |
+
|
| 198 |
+
|
| 199 |
|
| 200 |
|
| 201 |
if __name__ == "__main__":
|