HUANG-Stephanie commited on
Commit
1e2bfed
1 Parent(s): ebeff34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import os
2
  import sys
3
 
@@ -85,7 +86,7 @@ async def search(query: str, k: int):
85
 
86
  results = []
87
  for idx in top_k_indices:
88
- img_byte_arr = BytesIO()
89
  images[idx].save(img_byte_arr, format='PNG')
90
  img_byte_arr = img_byte_arr.getvalue()
91
  img_base64 = base64.b64encode(img_byte_arr).decode('utf-8')
 
1
+ import io
2
  import os
3
  import sys
4
 
 
86
 
87
  results = []
88
  for idx in top_k_indices:
89
+ img_byte_arr = io.BytesIO()
90
  images[idx].save(img_byte_arr, format='PNG')
91
  img_byte_arr = img_byte_arr.getvalue()
92
  img_base64 = base64.b64encode(img_byte_arr).decode('utf-8')