awacke1 commited on
Commit
b9b5cdf
1 Parent(s): ca2da2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -265,9 +265,10 @@ def main():
265
  process_text(st.session_state.current_user['name'], text_input)
266
  elif option == "Image":
267
  text_input = st.text_input("Enter text prompt to use with Image context:")
268
- image_input = st.file_uploader("Upload an image", type=["png"])
269
- if image_input:
270
- process_image(st.session_state.current_user['name'], image_input, text_input)
 
271
  elif option == "Audio":
272
  text_input = st.text_input("Enter text prompt to use with Audio context:")
273
  uploaded_files = st.file_uploader("Upload an audio file", type=["mp3", "wav"], accept_multiple_files=True)
 
265
  process_text(st.session_state.current_user['name'], text_input)
266
  elif option == "Image":
267
  text_input = st.text_input("Enter text prompt to use with Image context:")
268
+ uploaded_files = st.file_uploader("Upload images", type=["png", "jpg", "jpeg"], accept_multiple_files=True)
269
+ for image_input in uploaded_files:
270
+ image_bytes = image_input.read()
271
+ process_image(st.session_state.current_user['name'], image_bytes, text_input)
272
  elif option == "Audio":
273
  text_input = st.text_input("Enter text prompt to use with Audio context:")
274
  uploaded_files = st.file_uploader("Upload an audio file", type=["mp3", "wav"], accept_multiple_files=True)