Kushwanth Chowday Kandala commited on
Commit
be1c697
1 Parent(s): 908d9b4

update upload a image

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -43,10 +43,13 @@ for i in st.session_state["chat_history"]:
43
  st.write(i["content"])
44
 
45
 
46
- # import numpy as np
47
- # from PIL import Image
48
 
49
- # img_file_buffer = st.file_uploader('Upload a PNG image', on_change= type=['png','jpg'])
50
- # if img_file_buffer is not None:
51
- # image = Image.open(img_file_buffer)
52
- # img_array = np.array(image)
 
 
 
 
 
43
  st.write(i["content"])
44
 
45
 
46
+ # img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
 
47
 
48
+
49
+ import numpy as np
50
+ from PIL import Image
51
+
52
+ img_file_buffer = st.file_uploader('Upload a PNG image', on_change= type=['png','jpg'])
53
+ if img_file_buffer is not None:
54
+ image = Image.open(img_file_buffer)
55
+ img_array = np.array(image)