Spaces:
Sleeping
Sleeping
pawandev
commited on
Commit
·
9e27d63
1
Parent(s):
ce8ac2a
Some changes due to error of image not found
Browse files- .gitignore +2 -0
- app/services/panServices/panOcr.py +1 -1
- app/utils/imageUtils.py +1 -1
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
env
|
| 2 |
+
.env
|
app/services/panServices/panOcr.py
CHANGED
|
@@ -40,7 +40,7 @@ def process_results(results, img):
|
|
| 40 |
|
| 41 |
final_image = all_cropped_images_to_one_image(cropped_images, separator_image_path='app/utils/seprator3.png')
|
| 42 |
buffer = BytesIO()
|
| 43 |
-
|
| 44 |
buffer.seek(0)
|
| 45 |
|
| 46 |
response = analyze_image(buffer.getvalue(), input_image_format)
|
|
|
|
| 40 |
|
| 41 |
final_image = all_cropped_images_to_one_image(cropped_images, separator_image_path='app/utils/seprator3.png')
|
| 42 |
buffer = BytesIO()
|
| 43 |
+
final_image.save(buffer, format=input_image_format)
|
| 44 |
buffer.seek(0)
|
| 45 |
|
| 46 |
response = analyze_image(buffer.getvalue(), input_image_format)
|
app/utils/imageUtils.py
CHANGED
|
@@ -42,7 +42,7 @@ def all_cropped_images_to_one_image(cropped_images, separator_image_path):
|
|
| 42 |
combined_image.paste(separator_image, (0, y))
|
| 43 |
y += separator_height
|
| 44 |
|
| 45 |
-
|
| 46 |
return combined_image
|
| 47 |
|
| 48 |
def preprocess_image(image):
|
|
|
|
| 42 |
combined_image.paste(separator_image, (0, y))
|
| 43 |
y += separator_height
|
| 44 |
|
| 45 |
+
combined_image.save("combinedImage.png")
|
| 46 |
return combined_image
|
| 47 |
|
| 48 |
def preprocess_image(image):
|