ShynBui commited on
Commit
be2e555
·
verified ·
1 Parent(s): 9f43149

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -2
utils.py CHANGED
@@ -6,9 +6,10 @@ import io
6
 
7
 
8
  def answer(input_img, selected):
9
- image = Image.open(input_img)
10
  buffer = io.BytesIO()
11
- image.save(buffer, format="PNG")
 
12
  image_data = base64.b64encode(buffer.getvalue()).decode('utf-8')
13
 
14
  if selected == "Describe things":
 
6
 
7
 
8
  def answer(input_img, selected):
9
+
10
  buffer = io.BytesIO()
11
+
12
+ input_img.save(buffer, format="PNG")
13
  image_data = base64.b64encode(buffer.getvalue()).decode('utf-8')
14
 
15
  if selected == "Describe things":