Spaces:
Running
Running
pragnakalp
commited on
Commit
•
550f96c
1
Parent(s):
3bcf69d
Update app.py
Browse files
app.py
CHANGED
@@ -153,10 +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,imge,text_output]
|
157 |
feature = datasets.Image(decode=False)
|
158 |
-
|
159 |
-
|
|
|
160 |
with open(DATA_FILE, "a") as f:
|
161 |
writer = csv.writer(f)
|
162 |
# write the data
|
|
|
153 |
|
154 |
new_data=img.reshape(img.shape)
|
155 |
imge = Image.fromarray(new_data.astype(np.uint8),'RGB')
|
|
|
156 |
feature = datasets.Image(decode=False)
|
157 |
+
add_csv = [Method,feature,text_output]
|
158 |
+
# new_image = {'image': feature.encode_example(imge)}
|
159 |
+
# print("newimage: ",new_image)
|
160 |
with open(DATA_FILE, "a") as f:
|
161 |
writer = csv.writer(f)
|
162 |
# write the data
|