mishig HF staff commited on
Commit
3f24cd0
1 Parent(s): 9a3a788

png -> jpeg

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. share_btn.py +2 -2
app.py CHANGED
@@ -59,7 +59,7 @@ def infer(prompt):
59
  payload = {'prompt': prompt}
60
  images_request = requests.post(url, json = payload)
61
  for image in images_request.json()["images"]:
62
- image_b64 = (f"data:image/png;base64,{image}")
63
  images.append(image_b64)
64
 
65
  return images
59
  payload = {'prompt': prompt}
60
  images_request = requests.post(url, json = payload)
61
  for image in images_request.json()["images"]:
62
+ image_b64 = (f"data:image/jpeg;base64,{image}")
63
  images.append(image_b64)
64
 
65
  return images
share_btn.py CHANGED
@@ -43,8 +43,8 @@ share_js = """async () => {
43
  const res = await fetch(imgEl.src);
44
  const blob = await res.blob();
45
  const imgId = Date.now() % 200;
46
- const fileName = `diffuse-the-rest-${{imgId}}.png`;
47
- return new File([blob], fileName, { type: 'image/png' });
48
  })
49
  );
50
 
43
  const res = await fetch(imgEl.src);
44
  const blob = await res.blob();
45
  const imgId = Date.now() % 200;
46
+ const fileName = `diffuse-the-rest-${{imgId}}.jpg`;
47
+ return new File([blob], fileName, { type: 'image/jpeg' });
48
  })
49
  );
50