Update app.py
Browse files
app.py
CHANGED
|
@@ -96,9 +96,9 @@ def main():
|
|
| 96 |
with st.container():
|
| 97 |
c1, c2, c3 = st.columns([2,2,1])
|
| 98 |
message = c1.text_input("Type your text here!")
|
| 99 |
-
if
|
| 100 |
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 101 |
-
if
|
| 102 |
CaptureImage =False
|
| 103 |
|
| 104 |
uploaded_photo = save(c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state))
|
|
@@ -181,7 +181,6 @@ def main():
|
|
| 181 |
return tokenizer, model
|
| 182 |
if "history" not in st.session_state:
|
| 183 |
st.session_state.history = []
|
| 184 |
-
st.title("Hello bot: ")
|
| 185 |
def generate_answer():
|
| 186 |
tokenizer, model = get_models()
|
| 187 |
user_message = st.session_state.input_text
|
|
|
|
| 96 |
with st.container():
|
| 97 |
c1, c2, c3 = st.columns([2,2,1])
|
| 98 |
message = c1.text_input("Type your text here!")
|
| 99 |
+
if c2.button("CaptureImage"):
|
| 100 |
camera_photo = c2.camera_input("Capture a photo to summarize: ", on_change=change_photo_state)
|
| 101 |
+
if c2.button("Stop camera"):
|
| 102 |
CaptureImage =False
|
| 103 |
|
| 104 |
uploaded_photo = save(c3.file_uploader("Upload your Images/PDF",type=['jpg','png','jpeg','pdf'], on_change=change_photo_state))
|
|
|
|
| 181 |
return tokenizer, model
|
| 182 |
if "history" not in st.session_state:
|
| 183 |
st.session_state.history = []
|
|
|
|
| 184 |
def generate_answer():
|
| 185 |
tokenizer, model = get_models()
|
| 186 |
user_message = st.session_state.input_text
|