Commit 4125f52b authored by Gamage B.G.J's avatar Gamage B.G.J

Merge branch 'IT20254384' into 'master'

Merge changes - IT20254384

See merge request !20
parents 60d92c17 129c8db5
This diff is collapsed.
......@@ -37,3 +37,23 @@
2023-08-03 06:00:41,626 - INFO - Error.
2023-08-03 06:00:41,626 - INFO - Error.
2023-08-03 06:00:41,626 - INFO - Error.
2023-08-30 22:39:49,234 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:39:49,234 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:39:49,234 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:39:49,259 - INFO - Error.
2023-08-30 22:39:49,259 - INFO - Error.
2023-08-30 22:39:49,259 - INFO - Error.
2023-08-30 22:40:09,426 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:40:09,426 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:40:09,426 - INFO - Failed to make predictions. [Errno 2] No such file or directory: 'files/2023-08-14 21.51.mov'
2023-08-30 22:40:09,427 - INFO - Error.
2023-08-30 22:40:09,427 - INFO - Error.
2023-08-30 22:40:09,427 - INFO - Error.
2023-09-02 18:07:23,625 - INFO - Failed to make predictions. 'NoneType' object has no attribute 'predict'
2023-09-02 18:07:23,625 - INFO - Failed to make predictions. 'NoneType' object has no attribute 'predict'
2023-09-02 18:07:23,625 - INFO - Failed to make predictions. 'NoneType' object has no attribute 'predict'
2023-09-02 18:07:23,625 - INFO - Failed to make predictions. 'NoneType' object has no attribute 'predict'
2023-09-02 18:07:23,627 - INFO - Error.
2023-09-02 18:07:23,627 - INFO - Error.
2023-09-02 18:07:23,627 - INFO - Error.
2023-09-02 18:07:23,627 - INFO - Error.
import os
from fastapi import APIRouter, File, HTTPException, Query,UploadFile
from pydantic import BaseModel
import tensorflow as tf
......@@ -18,7 +19,15 @@ class ImageRequest(BaseModel):
# Load your Keras model
# model = tf.keras.models.load_model('../ML_Models/sign_language_to_text/models/sign_language_model.h5')
model= None
model_file_path = '../ML_Models/sign_language_to_text/models/sign_language_model.h5'
# Check if the model file exists
if os.path.exists(model_file_path):
# Load the Keras model if the file exists
model = tf.keras.models.load_model(model_file_path)
else:
model = None
CLASSES = mappings.classes
NUM_CLASSES = len(mappings.classes) # number of classes
IMG_SIZE = 224 # image size
......
......@@ -6,4 +6,5 @@ opencv-python==4.7.0.72
moviepy==1.0.3
SpeechRecognition==3.10.0
tk==0.1.0
requests==2.31.0
\ No newline at end of file
requests==2.31.0
pymongo==4.5.0
\ No newline at end of file
......@@ -154,7 +154,7 @@ const Process = () => {
};
return (
<>
<MainCard content={false}>
<MainCard content={false} title="Translate Sinhala Sign Language into Text Here">
<ScrollX>
{/* content here */}
......@@ -233,7 +233,7 @@ const Process = () => {
step={10}
marks
min={10}
max={110}
max={100}
/>
<h4>Speed - {speed}</h4>
</Grid>
......@@ -331,7 +331,7 @@ const Process = () => {
step={10}
marks
min={10}
max={110}
max={100}
/>
<h4>Speed - {speed}</h4>
</Grid>
......
......@@ -161,7 +161,7 @@
"learning-curriculums-subscribed": "My Courses",
"learning-lead-board": "Lead Board",
"learning-feedback": "Feedback",
"ssl-translate": "SSL Translate",
"ssl-translate": "SSL Translation",
"emotion-detection": "Emotion Detection",
"audio-detection": "Audio Detection",
"video-detection": "Video Detection",
......@@ -169,4 +169,4 @@
"learning-curriculums-subscribed-tutorial": "Tutorial",
"video-to-sign-language": "Sign Language Translate",
"video-translate": "Video Translator"
}
\ No newline at end of file
}
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