Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-077
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020-077
2020-077
Commits
112f4995
Commit
112f4995
authored
Jan 06, 2021
by
Manoj Kumar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bavan_dev' into 'master'
Bavan dev See merge request
!66
parents
efff5624
18ea1d43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
translation/trans.py
translation/trans.py
+9
-4
No files found.
translation/trans.py
View file @
112f4995
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment