bramw commited on
Commit
6b170f4
1 Parent(s): a8b8679

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -20,6 +20,13 @@ def local_edict(x, source_text, edit_text,
20
  )[0]
21
  return np.array(return_im)
22
 
 
 
 
 
 
 
 
23
 
24
 
25
  def decode_image(img_obj):
 
20
  )[0]
21
  return np.array(return_im)
22
 
23
+ def encode_image(image):
24
+ buffered = BytesIO()
25
+ image.save(buffered, format="JPEG")
26
+ buffered.seek(0)
27
+
28
+ return buffered
29
+
30
 
31
 
32
  def decode_image(img_obj):