Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,7 @@ def demo_page():
|
|
| 114 |
# Process the first image
|
| 115 |
response = requests.get(url1)
|
| 116 |
img1 = Image.open(BytesIO(response.content)).convert("RGB")
|
| 117 |
-
rectangled_img1 = cropper(img1,
|
| 118 |
output1 = BytesIO()
|
| 119 |
rectangled_img1.save(output1, format="JPEG")
|
| 120 |
encoded_img1 = base64.b64encode(output1.getvalue()).decode("utf-8")
|
|
@@ -122,7 +122,7 @@ def demo_page():
|
|
| 122 |
# Process the second image
|
| 123 |
response = requests.get(url2)
|
| 124 |
img2 = Image.open(BytesIO(response.content)).convert("RGB")
|
| 125 |
-
rectangled_img2 = cropper(img2,
|
| 126 |
output2 = BytesIO()
|
| 127 |
rectangled_img2.save(output2, format="JPEG")
|
| 128 |
encoded_img2 = base64.b64encode(output2.getvalue()).decode("utf-8")
|
|
|
|
| 114 |
# Process the first image
|
| 115 |
response = requests.get(url1)
|
| 116 |
img1 = Image.open(BytesIO(response.content)).convert("RGB")
|
| 117 |
+
rectangled_img1 = cropper(img1, 200, 200)
|
| 118 |
output1 = BytesIO()
|
| 119 |
rectangled_img1.save(output1, format="JPEG")
|
| 120 |
encoded_img1 = base64.b64encode(output1.getvalue()).decode("utf-8")
|
|
|
|
| 122 |
# Process the second image
|
| 123 |
response = requests.get(url2)
|
| 124 |
img2 = Image.open(BytesIO(response.content)).convert("RGB")
|
| 125 |
+
rectangled_img2 = cropper(img2, 300,300)
|
| 126 |
output2 = BytesIO()
|
| 127 |
rectangled_img2.save(output2, format="JPEG")
|
| 128 |
encoded_img2 = base64.b64encode(output2.getvalue()).decode("utf-8")
|