Commit 112f4995 authored by Manoj Kumar's avatar Manoj Kumar

Merge branch 'bavan_dev' into 'master'

Bavan dev

See merge request !66
parents efff5624 18ea1d43
......@@ -11,6 +11,8 @@ import numpy as np
import os
import string
tensorflow.compat.v1.disable_eager_execution()
class Translation:
PATH = os.path.dirname(__file__)
......@@ -58,19 +60,22 @@ class Translation:
self.data[0] = normalized_image_array
# run the inference
print("Before model*****************")
prediction = self.model.predict(self.data)
print("After model*****************")
#print(prediction)
#print(prediction.shape)
#print(type(prediction))
#print(prediction[0, 2])
for alpha in range(26):
if prediction[0, alpha] >= 0.8:
#print(string.ascii_uppercase[alpha])
return string.ascii_uppercase[alpha]
#break
print(string.ascii_uppercase[alpha])
#return string.ascii_uppercase[alpha]
break
print("After Classification*****************")
# if os.path.exists(loc):
# os.remove(loc)
# else:
# print("The file does not exist")
# return
return
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment