Spaces:
Sleeping
Sleeping
Commit
·
0a3dbb8
1
Parent(s):
93fe459
Update app.py
Browse files
app.py
CHANGED
@@ -153,11 +153,7 @@ 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 |
-
feature = datasets.Image(decode=False)
|
159 |
-
new_image = {'image': feature.encode_example(imge)}
|
160 |
-
dataset['test'] = dataset['test'].add_item(new_image)
|
161 |
|
162 |
with open(DATA_FILE, "a") as f:
|
163 |
writer = csv.writer(f)
|
|
|
153 |
|
154 |
new_data=img.reshape(img.shape)
|
155 |
imge = Image.fromarray(new_data.astype(np.uint8),'RGB')
|
156 |
+
add_csv = [Method,img,text_output]
|
|
|
|
|
|
|
|
|
157 |
|
158 |
with open(DATA_FILE, "a") as f:
|
159 |
writer = csv.writer(f)
|