Commit
·
b5df9db
1
Parent(s):
0a3dbb8
Update app.py
Browse files
app.py
CHANGED
|
@@ -153,8 +153,10 @@ def generate_ocr(Method,img):
|
|
| 153 |
|
| 154 |
new_data=img.reshape(img.shape)
|
| 155 |
imge = Image.fromarray(new_data.astype(np.uint8),'RGB')
|
| 156 |
-
add_csv = [Method,
|
| 157 |
-
|
|
|
|
|
|
|
| 158 |
with open(DATA_FILE, "a") as f:
|
| 159 |
writer = csv.writer(f)
|
| 160 |
# write the data
|
|
|
|
| 153 |
|
| 154 |
new_data=img.reshape(img.shape)
|
| 155 |
imge = Image.fromarray(new_data.astype(np.uint8),'RGB')
|
| 156 |
+
add_csv = [Method,imge,text_output]
|
| 157 |
+
feature = datasets.Image(decode=False)
|
| 158 |
+
new_image = {'image': feature.encode_example(image)}
|
| 159 |
+
print("newimage: ",new_image)
|
| 160 |
with open(DATA_FILE, "a") as f:
|
| 161 |
writer = csv.writer(f)
|
| 162 |
# write the data
|