Update app.py
Browse files
app.py
CHANGED
|
@@ -19,12 +19,8 @@ def convert_mask_image_to_base64_string(mask_image):
|
|
| 19 |
return f",{image_base64_string}" # for some reason the funciton which downloads image from base64 expects prefix of "," which is redundant in the url
|
| 20 |
|
| 21 |
def download_image(url):
|
| 22 |
-
|
| 23 |
-
response = requests.get(url, stream=True)
|
| 24 |
-
print(len(response.content))
|
| 25 |
-
print(response.content)
|
| 26 |
img_bytes = BytesIO(response.content)
|
| 27 |
-
print(img_bytes)
|
| 28 |
return Image.open(img_bytes).convert("RGB")
|
| 29 |
|
| 30 |
def gen_fill_api_call(image_base64_file, mask_base64_file, prompt):
|
|
|
|
| 19 |
return f",{image_base64_string}" # for some reason the funciton which downloads image from base64 expects prefix of "," which is redundant in the url
|
| 20 |
|
| 21 |
def download_image(url):
|
| 22 |
+
response = requests.get(url)
|
|
|
|
|
|
|
|
|
|
| 23 |
img_bytes = BytesIO(response.content)
|
|
|
|
| 24 |
return Image.open(img_bytes).convert("RGB")
|
| 25 |
|
| 26 |
def gen_fill_api_call(image_base64_file, mask_base64_file, prompt):
|