Final Commit

parent d0c249ae
......@@ -25,6 +25,7 @@ const app = express();
const corsOptions = {
origin: 'http://localhost:3000',
origin: 'http://localhost:3001',
};
app.use(bodyParser.json({ limit: "30mb", extended: true }));
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ async def upload_video(video: UploadFile = File(...)):
with open(file_location, "wb") as file:
file.write(video.file.read())
return {"text": "OK2"}
return {"text": "Video Upload Successfully"}
except Exception as e:
logger.info(f"Failed to upload file. {e}")
raise HTTPException(
......
......@@ -84,7 +84,7 @@ async def uploaded_video(file: UploadFile = File(...)):
return JSONResponse(content={"error": str(e)}, status_code=500)
unicode_to_int_mapping = {"මම": 1, "හෙට": 2, "යනවා": 3, "මං": 4}
unicode_to_int_mapping = {"මම": 1, "හෙට": 2, "යනවා": 3, "මං": 4,"ගුඩ්":5, "මෝනිං":6, "උඹ":7, "ආවේ":8, "ඇයි":9}
def translate_text(text, target_language):
......
......@@ -61,7 +61,8 @@ origins = [
"http://localhost:51373",
"http://localhost:51489",
"https://v6p9d9t4.ssl.hwcdn.net",
"https://64f66d39fdef493229b2ddd9--lambent-unicorn-97396a.netlify.app"
# "https://64f66d39fdef493229b2ddd9--lambent-unicorn-97396a.netlify.app",
"https://64f7cfd336356b18eb42de2b--lambent-unicorn-97396a.netlify.app"
]
app.add_middleware(
......
......@@ -24,6 +24,7 @@ emotion_model.load_weights("../ML_Models/Emotion_Detection_Model/emotion_model.h
class EmotionPredictionService:
def __init__(self, model):
self.model = model
self.current_emotion = None
def predict_emotion_detection_video(video_request: UploadFile) -> Dict[str, str]:
try:
......@@ -85,7 +86,26 @@ class EmotionPredictionService:
break
emotions = predict_emotion_from_frame(frame)
predicted_emotions.extend(emotions)
if emotions:
new_emotion = emotions[0] # Assuming you only process one face at a time
cv2.putText(frame, f"Emotion: {new_emotion}", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
if new_emotion != self.current_emotion:
self.current_emotion = new_emotion
predicted_emotions.append(new_emotion)
# Display the frame with emotion prediction
cv2.imshow('Emotion Detection', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# while True:
# ret, frame = cap.read()
# if not ret:
# break
# emotions = predict_emotion_from_frame(frame)
# predicted_emotions.extend(emotions)
cap.release()
os.remove(video_location)
......
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 21C5 17.134 8.13401 14 12 14C15.866 14 19 17.134 19 21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M27 4.5H5C3.34315 4.5 2 5.84315 2 7.5V24.5C2 26.1569 3.34315 27.5 5 27.5H27C28.6569 27.5 30 26.1569 30 24.5V7.5C30 5.84315 28.6569 4.5 27 4.5Z" fill="#1B5E20"/>
<path d="M13.11 15.13C13.5384 14.714 13.8328 14.1797 13.9558 13.5954C14.0787 13.0111 14.0244 12.4034 13.8 11.8501C13.5755 11.2968 13.1911 10.823 12.6958 10.4895C12.2006 10.156 11.6171 9.97778 11.02 9.97778C10.4229 9.97778 9.83941 10.156 9.34417 10.4895C8.84892 10.823 8.46448 11.2968 8.24003 11.8501C8.01558 12.4034 7.96135 13.0111 8.08426 13.5954C8.20718 14.1797 8.50166 14.714 8.93001 15.13C6.72001 15.75 5.07001 18.13 5.07001 20.97C5.07001 21.2352 5.17536 21.4895 5.3629 21.6771C5.55044 21.8646 5.80479 21.97 6.07001 21.97C6.33522 21.97 6.58958 21.8646 6.77711 21.6771C6.96465 21.4895 7.07001 21.2352 7.07001 20.97C7.07001 18.76 8.42001 16.97 10.07 16.97H12.07C13.72 16.97 15.07 18.76 15.07 20.97C15.07 21.2352 15.1754 21.4895 15.3629 21.6771C15.5504 21.8646 15.8048 21.97 16.07 21.97C16.3352 21.97 16.5896 21.8646 16.7771 21.6771C16.9647 21.4895 17.07 21.2352 17.07 20.97C17.07 18.12 15.37 15.71 13.11 15.13ZM11 12C11.1978 12 11.3911 12.0586 11.5556 12.1685C11.72 12.2784 11.8482 12.4346 11.9239 12.6173C11.9996 12.8 12.0194 13.0011 11.9808 13.1951C11.9422 13.389 11.847 13.5672 11.7071 13.7071C11.5673 13.8469 11.3891 13.9422 11.1951 13.9808C11.0011 14.0193 10.8 13.9995 10.6173 13.9238C10.4346 13.8482 10.2784 13.72 10.1685 13.5555C10.0587 13.3911 10 13.1977 10 13C10 12.7348 10.1054 12.4804 10.2929 12.2929C10.4804 12.1053 10.7348 12 11 12Z" fill="#F57F17"/>
<path d="M30 15.03V17.03H22.01L22 27.5H20L20.01 17.02L20 4.5H22L22.01 15.03H30Z" fill="#EEEEEE"/>
<path d="M5 4.5C4.20435 4.5 3.44129 4.81607 2.87868 5.37868C2.31607 5.94129 2 6.70435 2 7.5V24.5C2 25.2956 2.31607 26.0587 2.87868 26.6213C3.44129 27.1839 4.20435 27.5 5 27.5H16V4.5H5Z" fill="#388E3C"/>
<path d="M13.11 15.13C13.5384 14.714 13.8328 14.1797 13.9558 13.5954C14.0787 13.0111 14.0244 12.4034 13.8 11.8501C13.5755 11.2968 13.1911 10.823 12.6958 10.4895C12.2006 10.156 11.6171 9.97778 11.02 9.97778C10.4229 9.97778 9.83941 10.156 9.34417 10.4895C8.84892 10.823 8.46448 11.2968 8.24003 11.8501C8.01558 12.4034 7.96135 13.0111 8.08426 13.5954C8.20718 14.1797 8.50166 14.714 8.93001 15.13C6.72001 15.75 5.07001 18.13 5.07001 20.97C5.07001 21.2352 5.17536 21.4895 5.3629 21.6771C5.55044 21.8646 5.80479 21.97 6.07001 21.97C6.33522 21.97 6.58958 21.8646 6.77711 21.6771C6.96465 21.4895 7.07001 21.2352 7.07001 20.97C7.07001 18.76 8.42001 16.97 10.07 16.97H12.07C13.72 16.97 15.07 18.76 15.07 20.97C15.0616 21.2286 15.1538 21.4805 15.3273 21.6725C15.5007 21.8646 15.7418 21.982 16 22V17.23C15.3281 16.198 14.2991 15.4502 13.11 15.13ZM11 14C10.8022 14 10.6089 13.9413 10.4444 13.8314C10.28 13.7216 10.1518 13.5654 10.0761 13.3827C10.0004 13.1999 9.98064 12.9989 10.0192 12.8049C10.0578 12.6109 10.153 12.4327 10.2929 12.2929C10.4328 12.153 10.6109 12.0578 10.8049 12.0192C10.9989 11.9806 11.2 12.0004 11.3827 12.0761C11.5654 12.1518 11.7216 12.2799 11.8315 12.4444C11.9414 12.6088 12 12.8022 12 13C12 13.2652 11.8947 13.5195 11.7071 13.7071C11.5196 13.8946 11.2652 14 11 14Z" fill="#F9A825"/>
<path d="M27 4.5H5C4.20435 4.5 3.44129 4.81607 2.87868 5.37868C2.31607 5.94129 2 6.70435 2 7.5V24.5C2 25.2956 2.31607 26.0587 2.87868 26.6213C3.44129 27.1839 4.20435 27.5 5 27.5H27C27.7956 27.5 28.5587 27.1839 29.1213 26.6213C29.6839 26.0587 30 25.2956 30 24.5V7.5C30 6.70435 29.6839 5.94129 29.1213 5.37868C28.5587 4.81607 27.7956 4.5 27 4.5ZM28 24.5C28 24.7652 27.8946 25.0196 27.7071 25.2071C27.5196 25.3946 27.2652 25.5 27 25.5H5C4.73478 25.5 4.48043 25.3946 4.29289 25.2071C4.10536 25.0196 4 24.7652 4 24.5V7.5C4 7.23478 4.10536 6.98043 4.29289 6.79289C4.48043 6.60536 4.73478 6.5 5 6.5H27C27.2652 6.5 27.5196 6.60536 27.7071 6.79289C27.8946 6.98043 28 7.23478 28 7.5V24.5Z" fill="#263238"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M27 2H5C3.34315 2 2 3.34315 2 5V19C2 20.6569 3.34315 22 5 22H27C28.6569 22 30 20.6569 30 19V5C30 3.34315 28.6569 2 27 2Z" fill="#1565C0"/>
<path d="M14.09 11.15C14.5183 10.734 14.8128 10.1997 14.9357 9.61538C15.0587 9.03108 15.0044 8.42339 14.78 7.8701C14.5555 7.3168 14.1711 6.84306 13.6758 6.50952C13.1806 6.17598 12.5971 5.9978 12 5.9978C11.4029 5.9978 10.8194 6.17598 10.3242 6.50952C9.82892 6.84306 9.44447 7.3168 9.22002 7.8701C8.99557 8.42339 8.94134 9.03108 9.06426 9.61538C9.18717 10.1997 9.48165 10.734 9.91 11.15C7.68 11.75 6 14.14 6 17C6 17.2652 6.10536 17.5196 6.29289 17.7071C6.48043 17.8946 6.73478 18 7 18C7.26522 18 7.51957 17.8946 7.70711 17.7071C7.89464 17.5196 8 17.2652 8 17C8 14.79 9.35 13 11 13H13C14.65 13 16 14.79 16 17C16 17.2652 16.1054 17.5196 16.2929 17.7071C16.4804 17.8946 16.7348 18 17 18C17.2652 18 17.5196 17.8946 17.7071 17.7071C17.8946 17.5196 18 17.2652 18 17C18 14.14 16.32 11.75 14.09 11.15ZM12 7.99999C12.1978 7.99999 12.3911 8.05864 12.5556 8.16852C12.72 8.2784 12.8482 8.43458 12.9239 8.6173C12.9996 8.80003 13.0194 9.0011 12.9808 9.19508C12.9422 9.38906 12.847 9.56724 12.7071 9.70709C12.5673 9.84695 12.3891 9.94219 12.1951 9.98077C12.0011 10.0194 11.8 9.99955 11.6173 9.92387C11.4346 9.84818 11.2784 9.72001 11.1685 9.55556C11.0586 9.39111 11 9.19777 11 8.99999C11 8.73477 11.1054 8.48042 11.2929 8.29288C11.4804 8.10534 11.7348 7.99999 12 7.99999Z" fill="#E64A19"/>
<path d="M25 8H22C21.7348 8 21.4804 7.89464 21.2929 7.70711C21.1054 7.51957 21 7.26522 21 7C21 6.73478 21.1054 6.48043 21.2929 6.29289C21.4804 6.10536 21.7348 6 22 6H25C25.2652 6 25.5196 6.10536 25.7071 6.29289C25.8946 6.48043 26 6.73478 26 7C26 7.26522 25.8946 7.51957 25.7071 7.70711C25.5196 7.89464 25.2652 8 25 8Z" fill="#E0E0E0"/>
<path d="M25 12H19C18.7348 12 18.4804 11.8946 18.2929 11.7071C18.1054 11.5196 18 11.2652 18 11C18 10.7348 18.1054 10.4804 18.2929 10.2929C18.4804 10.1054 18.7348 10 19 10H25C25.2652 10 25.5196 10.1054 25.7071 10.2929C25.8946 10.4804 26 10.7348 26 11C26 11.2652 25.8946 11.5196 25.7071 11.7071C25.5196 11.8946 25.2652 12 25 12Z" fill="#E0E0E0"/>
<path d="M25 16H22C21.7348 16 21.4804 15.8946 21.2929 15.7071C21.1054 15.5196 21 15.2652 21 15C21 14.7348 21.1054 14.4804 21.2929 14.2929C21.4804 14.1054 21.7348 14 22 14H25C25.2652 14 25.5196 14.1054 25.7071 14.2929C25.8946 14.4804 26 14.7348 26 15C26 15.2652 25.8946 15.5196 25.7071 15.7071C25.5196 15.8946 25.2652 16 25 16Z" fill="#E0E0E0"/>
<path d="M27 24H5C4.20435 24 3.44129 24.3161 2.87868 24.8787C2.31607 25.4413 2 26.2044 2 27C2 27.7956 2.31607 28.5587 2.87868 29.1213C3.44129 29.6839 4.20435 30 5 30H27C27.7956 30 28.5587 29.6839 29.1213 29.1213C29.6839 28.5587 30 27.7956 30 27C30 26.2044 29.6839 25.4413 29.1213 24.8787C28.5587 24.3161 27.7956 24 27 24Z" fill="#37474F"/>
<path d="M5 2C4.20435 2 3.44129 2.31607 2.87868 2.87868C2.31607 3.44129 2 4.20435 2 5V19C2 19.7956 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H16V2H5Z" fill="#1E88E5"/>
<path d="M14.09 11.15C14.5183 10.734 14.8128 10.1997 14.9357 9.61538C15.0587 9.03108 15.0044 8.42339 14.78 7.8701C14.5555 7.3168 14.1711 6.84306 13.6758 6.50952C13.1806 6.17598 12.5971 5.9978 12 5.9978C11.4029 5.9978 10.8194 6.17598 10.3242 6.50952C9.82892 6.84306 9.44447 7.3168 9.22002 7.8701C8.99557 8.42339 8.94134 9.03108 9.06426 9.61538C9.18717 10.1997 9.48165 10.734 9.91 11.15C7.68 11.75 6 14.14 6 17C6 17.2652 6.10536 17.5196 6.29289 17.7071C6.48043 17.8946 6.73478 18 7 18C7.26522 18 7.51957 17.8946 7.70711 17.7071C7.89464 17.5196 8 17.2652 8 17C8 14.79 9.35 13 11 13H13C14.65 13 16 14.79 16 17V12.23C15.4593 11.7218 14.8042 11.3514 14.09 11.15ZM12 9.99999C11.8022 9.99999 11.6089 9.94134 11.4444 9.83146C11.28 9.72158 11.1518 9.5654 11.0761 9.38267C11.0004 9.19995 10.9806 8.99888 11.0192 8.8049C11.0578 8.61092 11.153 8.43273 11.2929 8.29288C11.4327 8.15303 11.6109 8.05779 11.8049 8.0192C11.9989 7.98062 12.2 8.00042 12.3827 8.07611C12.5654 8.1518 12.7216 8.27997 12.8315 8.44442C12.9414 8.60887 13 8.80221 13 8.99999C13 9.2652 12.8946 9.51956 12.7071 9.70709C12.5196 9.89463 12.2652 9.99999 12 9.99999Z" fill="#FF7043"/>
<path d="M5 24C4.20435 24 3.44129 24.3161 2.87868 24.8787C2.31607 25.4413 2 26.2044 2 27C2 27.7956 2.31607 28.5587 2.87868 29.1213C3.44129 29.6839 4.20435 30 5 30H16V24H5Z" fill="#455A64"/>
<path d="M27 2H5C4.20435 2 3.44129 2.31607 2.87868 2.87868C2.31607 3.44129 2 4.20435 2 5V19C2 19.7956 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H27C27.7956 22 28.5587 21.6839 29.1213 21.1213C29.6839 20.5587 30 19.7956 30 19V5C30 4.20435 29.6839 3.44129 29.1213 2.87868C28.5587 2.31607 27.7956 2 27 2ZM28 19C28 19.2652 27.8946 19.5196 27.7071 19.7071C27.5196 19.8946 27.2652 20 27 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V5C4 4.73478 4.10536 4.48043 4.29289 4.29289C4.48043 4.10536 4.73478 4 5 4H27C27.2652 4 27.5196 4.10536 27.7071 4.29289C27.8946 4.48043 28 4.73478 28 5V19Z" fill="#263238"/>
<path d="M27 24H5C4.20435 24 3.44129 24.3161 2.87868 24.8787C2.31607 25.4413 2 26.2044 2 27C2 27.7956 2.31607 28.5587 2.87868 29.1213C3.44129 29.6839 4.20435 30 5 30H27C27.7956 30 28.5587 29.6839 29.1213 29.1213C29.6839 28.5587 30 27.7956 30 27C30 26.2044 29.6839 25.4413 29.1213 24.8787C28.5587 24.3161 27.7956 24 27 24ZM27 28H5C4.73478 28 4.48043 27.8946 4.29289 27.7071C4.10536 27.5196 4 27.2652 4 27C4 26.7348 4.10536 26.4804 4.29289 26.2929C4.48043 26.1054 4.73478 26 5 26H27C27.2652 26 27.5196 26.1054 27.7071 26.2929C27.8946 26.4804 28 26.7348 28 27C28 27.2652 27.8946 27.5196 27.7071 27.7071C27.5196 27.8946 27.2652 28 27 28Z" fill="#263238"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 27.9201H7C6.73478 27.9201 6.48043 27.8147 6.29289 27.6272C6.10536 27.4396 6 27.1853 6 26.9201C6 26.6548 6.10536 26.4005 6.29289 26.213C6.48043 26.0254 6.73478 25.9201 7 25.9201H9.23L10 23.6001C10.0903 23.3532 10.2742 23.1518 10.5119 23.0396C10.7496 22.9273 11.0219 22.9131 11.27 23.0001C11.52 23.0845 11.7265 23.2643 11.8445 23.5003C11.9625 23.7363 11.9825 24.0094 11.9 24.2601L10.9 27.2601C10.8326 27.4471 10.7109 27.6097 10.5506 27.7273C10.3903 27.8449 10.1986 27.912 10 27.9201Z" fill="#FF8F00"/>
<path d="M6 28.92C5.60444 28.92 5.21776 28.8027 4.88886 28.583C4.55996 28.3632 4.30362 28.0509 4.15224 27.6854C4.00087 27.32 3.96126 26.9178 4.03843 26.5299C4.1156 26.1419 4.30608 25.7855 4.58579 25.5058C4.86549 25.2261 5.22186 25.0356 5.60982 24.9585C5.99778 24.8813 6.39992 24.9209 6.76537 25.0723C7.13082 25.2237 7.44318 25.48 7.66294 25.8089C7.8827 26.1378 8 26.5245 8 26.92C8 27.4505 7.78929 27.9592 7.41421 28.3343C7.03914 28.7093 6.53043 28.92 6 28.92Z" fill="#1565C0"/>
<path d="M9 7.92006C8.86769 7.91951 8.73681 7.89271 8.61493 7.84122C8.49306 7.78972 8.38261 7.71455 8.29 7.62006L6.59 5.92006H5C4.73478 5.92006 4.48043 5.8147 4.29289 5.62717C4.10536 5.43963 4 5.18528 4 4.92006C4 4.65484 4.10536 4.40049 4.29289 4.21295C4.48043 4.02542 4.73478 3.92006 5 3.92006H7C7.13161 3.9193 7.26207 3.94452 7.38391 3.99429C7.50574 4.04405 7.61656 4.11738 7.71 4.21006L9.71 6.21006C9.85103 6.34993 9.94721 6.52863 9.98628 6.72338C10.0253 6.91813 10.0055 7.1201 9.92937 7.30354C9.8532 7.48699 9.72413 7.64359 9.55861 7.75339C9.39309 7.86319 9.19862 7.92122 9 7.92006Z" fill="#FF8F00"/>
<path d="M4 6.92004C3.60444 6.92004 3.21776 6.80275 2.88886 6.58298C2.55996 6.36322 2.30362 6.05086 2.15224 5.68541C2.00087 5.31996 1.96126 4.91783 2.03843 4.52986C2.1156 4.1419 2.30608 3.78554 2.58579 3.50583C2.86549 3.22613 3.22186 3.03564 3.60982 2.95847C3.99778 2.8813 4.39992 2.92091 4.76537 3.07229C5.13082 3.22366 5.44318 3.48001 5.66294 3.8089C5.8827 4.1378 6 4.52448 6 4.92005C6 5.45048 5.78929 5.95919 5.41421 6.33426C5.03914 6.70933 4.53043 6.92004 4 6.92004Z" fill="#1565C0"/>
<path d="M21.95 6.92004H23.95L24.95 4.92004H26.95" fill="#F57C00"/>
<path d="M24 7.92004H22C21.7348 7.92004 21.4804 7.81469 21.2929 7.62715C21.1054 7.43961 21 7.18526 21 6.92004C21 6.65483 21.1054 6.40047 21.2929 6.21294C21.4804 6.0254 21.7348 5.92004 22 5.92004H23.38L24.11 4.47004C24.1931 4.30513 24.3202 4.16645 24.4773 4.06937C24.6344 3.97229 24.8153 3.9206 25 3.92004H27C27.2652 3.92004 27.5196 4.0254 27.7071 4.21294C27.8946 4.40047 28 4.65483 28 4.92004C28 5.18526 27.8946 5.43961 27.7071 5.62715C27.5196 5.81469 27.2652 5.92004 27 5.92004H25.57L24.85 7.36004C24.7714 7.52093 24.6511 7.65778 24.5016 7.75629C24.3521 7.85479 24.1788 7.91135 24 7.92004Z" fill="#F57C00"/>
<path d="M28.05 7.09009C27.6544 7.09009 27.2677 6.97279 26.9388 6.75303C26.61 6.53327 26.3536 6.22091 26.2022 5.85546C26.0509 5.49 26.0112 5.08787 26.0884 4.69991C26.1656 4.31195 26.3561 3.95558 26.6358 3.67588C26.9155 3.39617 27.2718 3.20569 27.6598 3.12852C28.0478 3.05135 28.4499 3.09095 28.8154 3.24233C29.1808 3.3937 29.4932 3.65005 29.7129 3.97895C29.9327 4.30785 30.05 4.69453 30.05 5.09009C30.05 5.62052 29.8393 6.12923 29.4642 6.5043C29.0891 6.87938 28.5804 7.09009 28.05 7.09009Z" fill="#1565C0"/>
<path d="M28.27 24.8001L24.27 20.8001L23 19.1601C22.9115 19.0535 22.8018 18.9664 22.6778 18.9044C22.5539 18.8424 22.4184 18.8069 22.28 18.8001C22.1425 18.7926 22.0048 18.8136 21.8758 18.8617C21.7467 18.9099 21.629 18.9843 21.53 19.0801L18.36 22.2201C18.2655 22.3127 18.1904 22.4231 18.1389 22.545C18.0874 22.6669 18.0606 22.7978 18.06 22.9301C18.0593 23.0617 18.0845 23.1921 18.1342 23.314C18.184 23.4358 18.2573 23.5466 18.35 23.6401L23.88 29.2001C24.4421 29.7628 25.2046 30.0794 26 30.0801C26.7954 30.0794 27.5579 29.7628 28.12 29.2001L28.29 29.0301C28.8461 28.4653 29.1562 27.7035 29.1524 26.9109C29.1487 26.1184 28.8314 25.3595 28.27 24.8001Z" fill="#304046"/>
<path d="M15.95 25.92C22.0251 25.92 26.95 20.9952 26.95 14.92C26.95 8.84491 22.0251 3.92004 15.95 3.92004C9.87488 3.92004 4.95001 8.84491 4.95001 14.92C4.95001 20.9952 9.87488 25.92 15.95 25.92Z" fill="#01579B"/>
<path d="M15.95 21.92C19.816 21.92 22.95 18.786 22.95 14.92C22.95 11.0541 19.816 7.92004 15.95 7.92004C12.084 7.92004 8.95001 11.0541 8.95001 14.92C8.95001 18.786 12.084 21.92 15.95 21.92Z" fill="#BBDEFB"/>
<path d="M10 28H7C6.73478 28 6.48043 27.8947 6.29289 27.7071C6.10536 27.5196 6 27.2652 6 27C6 26.7348 6.10536 26.4804 6.29289 26.2929C6.48043 26.1054 6.73478 26 7 26H9.28L10.05 23.68C10.1349 23.4281 10.3164 23.2201 10.5545 23.102C10.6725 23.0435 10.8008 23.0088 10.9321 22.9999C11.0634 22.9909 11.1952 23.008 11.32 23.05C11.4448 23.092 11.56 23.1582 11.6592 23.2448C11.7584 23.3313 11.8395 23.4366 11.898 23.5545C11.9565 23.6725 11.9912 23.8008 12.0001 23.9321C12.0091 24.0634 11.992 24.1953 11.95 24.32L10.95 27.32C10.8829 27.5186 10.7551 27.6911 10.5846 27.8132C10.4142 27.9352 10.2096 28.0005 10 28Z" fill="#FF8F00"/>
<path d="M6 29C5.60444 29 5.21776 28.8827 4.88886 28.6629C4.55996 28.4432 4.30362 28.1308 4.15224 27.7654C4.00087 27.3999 3.96126 26.9978 4.03843 26.6098C4.1156 26.2219 4.30608 25.8655 4.58579 25.5858C4.86549 25.3061 5.22186 25.1156 5.60982 25.0384C5.99778 24.9613 6.39992 25.0009 6.76537 25.1522C7.13082 25.3036 7.44318 25.56 7.66294 25.8889C7.8827 26.2178 8 26.6044 8 27C8 27.5304 7.78929 28.0391 7.41421 28.4142C7.03914 28.7893 6.53043 29 6 29Z" fill="#0277BD"/>
<path d="M9 8.00002C8.86839 8.00078 8.73793 7.97555 8.61609 7.92579C8.49426 7.87602 8.38344 7.8027 8.29 7.71002L6.59 6.00002H5C4.73478 6.00002 4.48043 5.89466 4.29289 5.70712C4.10536 5.51959 4 5.26523 4 5.00002C4 4.7348 4.10536 4.48045 4.29289 4.29291C4.48043 4.10537 4.73478 4.00002 5 4.00002H7C7.13161 3.99926 7.26207 4.02448 7.38391 4.07425C7.50574 4.12401 7.61656 4.19734 7.71 4.29002L9.71 6.29002C9.80373 6.38298 9.87812 6.49358 9.92889 6.61544C9.97966 6.7373 10.0058 6.868 10.0058 7.00002C10.0058 7.13203 9.97966 7.26273 9.92889 7.38459C9.87812 7.50645 9.80373 7.61705 9.71 7.71002C9.61656 7.8027 9.50574 7.87602 9.38391 7.92579C9.26207 7.97555 9.13161 8.00078 9 8.00002Z" fill="#FF8F00"/>
<path d="M4 7C3.60444 7 3.21776 6.8827 2.88886 6.66294C2.55996 6.44318 2.30362 6.13082 2.15224 5.76537C2.00087 5.39992 1.96126 4.99778 2.03843 4.60982C2.1156 4.22186 2.30608 3.86549 2.58579 3.58579C2.86549 3.30608 3.22186 3.1156 3.60982 3.03843C3.99778 2.96126 4.39992 3.00087 4.76537 3.15224C5.13082 3.30362 5.44318 3.55996 5.66294 3.88886C5.8827 4.21776 6 4.60444 6 5C6 5.53043 5.78929 6.03914 5.41421 6.41421C5.03914 6.78929 4.53043 7 4 7Z" fill="#0277BD"/>
<path d="M5 15C5 17.9174 6.15893 20.7153 8.22183 22.7782C10.2847 24.8411 13.0826 26 16 26V4C13.0826 4 10.2847 5.15893 8.22183 7.22183C6.15893 9.28473 5 12.0826 5 15Z" fill="#0277BD"/>
<path d="M9 15C9 16.8565 9.7375 18.637 11.0503 19.9497C12.363 21.2625 14.1435 22 16 22V8C14.1435 8 12.363 8.7375 11.0503 10.0503C9.7375 11.363 9 13.1435 9 15Z" fill="#E3F2FD"/>
<path d="M28.27 24.8L24.86 21.34C26.2364 19.4812 26.9858 17.2328 27 14.92C27.0106 12.5601 26.2655 10.2588 24.8737 8.35299C23.4818 6.4472 21.5164 5.03707 19.2652 4.32907C17.014 3.62107 14.5952 3.6524 12.3631 4.41847C10.131 5.18453 8.20274 6.64509 6.86072 8.58628C5.51871 10.5275 4.83342 12.8473 4.9052 15.2062C4.97698 17.565 5.80205 19.8389 7.25961 21.6949C8.71717 23.5509 10.7306 24.8915 13.0052 25.5204C15.2798 26.1494 17.696 26.0336 19.9 25.19L23.9 29.19C24.1795 29.4698 24.5116 29.6917 24.8771 29.8427C25.2427 29.9937 25.6345 30.071 26.03 30.07C26.4255 30.071 26.8173 29.9937 27.1828 29.8427C27.5484 29.6917 27.8805 29.4698 28.16 29.19L28.33 29.02C28.8778 28.4505 29.1788 27.6878 29.1675 26.8977C29.1563 26.1075 28.8338 25.3537 28.27 24.8ZM6.99997 14.92C6.99997 13.14 7.52782 11.3999 8.51675 9.91986C9.50568 8.43982 10.9113 7.28627 12.5558 6.60508C14.2004 5.92389 16.01 5.74566 17.7558 6.09293C19.5016 6.44019 21.1053 7.29736 22.3639 8.55603C23.6226 9.81471 24.4798 11.4184 24.827 13.1642C25.1743 14.91 24.9961 16.7196 24.3149 18.3641C23.6337 20.0087 22.4801 21.4143 21.0001 22.4032C19.5201 23.3922 17.78 23.92 16 23.92C13.613 23.92 11.3238 22.9718 9.63601 21.284C7.94819 19.5961 6.99997 17.3069 6.99997 14.92ZM26.84 27.61L26.66 27.79C26.5665 27.8827 26.4557 27.956 26.3339 28.0058C26.212 28.0555 26.0816 28.0808 25.95 28.08C25.8184 28.0808 25.6879 28.0555 25.5661 28.0058C25.4442 27.956 25.3334 27.8827 25.24 27.79L21.74 24.25C22.3861 23.8497 22.9893 23.3839 23.54 22.86L26.84 26.21C27.0232 26.3969 27.1258 26.6482 27.1258 26.91C27.1258 27.1717 27.0232 27.4231 26.84 27.61Z" fill="#263238"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.3 8.40007L21.82 6.40008C21.7248 6.27314 21.6008 6.17066 21.4583 6.10111C21.3157 6.03156 21.1586 5.99693 21 6.00008H11.2C11.0555 6.00007 10.9128 6.03135 10.7816 6.09177C10.6504 6.15219 10.5339 6.24031 10.44 6.35007L8.71998 8.35008C8.57227 8.53401 8.49435 8.76424 8.49998 9.00008V16.2901C8.50262 18.0317 9.19567 19.7013 10.4272 20.9328C11.6588 22.1644 13.3283 22.8574 15.07 22.8601H16.93C18.6716 22.8574 20.3412 22.1644 21.5728 20.9328C22.8043 19.7013 23.4973 18.0317 23.5 16.2901V9.00008C23.5 8.7837 23.4298 8.57317 23.3 8.40007Z" fill="#FFCC80"/>
<path d="M29.78 28.38L25.78 23.38C25.664 23.2321 25.5086 23.1198 25.3318 23.0562C25.1549 22.9925 24.9637 22.98 24.78 23.02L16 25L7.21999 23C7.03632 22.96 6.84507 22.9725 6.6682 23.0362C6.49133 23.0998 6.33598 23.2121 6.21999 23.36L2.21999 28.36C2.10392 28.5064 2.03116 28.6823 2.00995 28.8679C1.98874 29.0534 2.01993 29.2413 2.09999 29.41C2.17815 29.5839 2.3044 29.7319 2.46385 29.8364C2.62331 29.9409 2.80933 29.9977 2.99999 30H29C29.1885 29.9995 29.373 29.9457 29.5322 29.8448C29.6914 29.744 29.8189 29.6002 29.9 29.43C29.98 29.2613 30.0112 29.0734 29.99 28.8879C29.9688 28.7023 29.8961 28.5264 29.78 28.38Z" fill="#01579B"/>
<path d="M29.29 6.00003L16.29 2.00003C16.0999 1.95002 15.9001 1.95002 15.71 2.00003L2.71 6.00003C2.49742 6.06422 2.31226 6.19735 2.1837 6.37841C2.05515 6.55947 1.99052 6.77817 2 7.00003C1.9917 7.22447 2.0592 7.44518 2.19163 7.62659C2.32405 7.80799 2.5137 7.93954 2.73 8.00003L15.73 11.6C15.906 11.6534 16.094 11.6534 16.27 11.6L29.27 8.00003C29.4863 7.93954 29.6759 7.80799 29.8084 7.62659C29.9408 7.44518 30.0083 7.22447 30 7.00003C30.0095 6.77817 29.9448 6.55947 29.8163 6.37841C29.6877 6.19735 29.5026 6.06422 29.29 6.00003Z" fill="#01579B"/>
<path d="M11.22 6C11.0756 5.99999 10.9328 6.03127 10.8016 6.09169C10.6704 6.15211 10.5539 6.24023 10.46 6.35L8.74 8.35C8.58509 8.53114 8.49998 8.76166 8.5 9V16.29C8.50264 18.0317 9.19569 19.7012 10.4272 20.9328C11.6588 22.1643 13.3283 22.8574 15.07 22.86H16V6H11.22Z" fill="#FFE0B2"/>
<path d="M7.21999 23C7.03632 22.96 6.84507 22.9725 6.6682 23.0362C6.49133 23.0998 6.33598 23.2121 6.21999 23.36L2.21999 28.36C2.10392 28.5064 2.03116 28.6823 2.00995 28.8679C1.98874 29.0534 2.01993 29.2413 2.09999 29.41C2.17815 29.5839 2.3044 29.7319 2.46385 29.8364C2.62331 29.9409 2.80933 29.9977 2.99999 30H16V25L7.21999 23Z" fill="#0277BD"/>
<path d="M15.71 2.00002L2.71 6.00002C2.49742 6.06422 2.31226 6.19734 2.1837 6.3784C2.05515 6.55947 1.99052 6.77817 2 7.00002C1.9917 7.22447 2.0592 7.44518 2.19163 7.62658C2.32405 7.80799 2.5137 7.93954 2.73 8.00002L15.73 11.6C15.8194 11.6146 15.9106 11.6146 16 11.6V2.00002C15.9039 1.98469 15.8061 1.98469 15.71 2.00002Z" fill="#0277BD"/>
<path d="M2.73 8.00003L8.5 9.56003V16.29C8.50264 18.0317 9.19569 19.7013 10.4272 20.9328C11.6588 22.1643 13.3283 22.8574 15.07 22.86H16.93C18.6717 22.8574 20.3412 22.1643 21.5728 20.9328C22.8043 19.7013 23.4974 18.0317 23.5 16.29V9.56003L29.27 8.00003C29.4863 7.93954 29.6759 7.80799 29.8084 7.62659C29.9408 7.44518 30.0083 7.22447 30 7.00003C30.0095 6.77817 29.9448 6.55947 29.8163 6.37841C29.6877 6.19735 29.5026 6.06422 29.29 6.00003L16.29 2.00003C16.0999 1.95002 15.9001 1.95002 15.71 2.00003L2.71 6.00003C2.49742 6.06422 2.31226 6.19735 2.1837 6.37841C2.05515 6.55947 1.99052 6.77817 2 7.00003C1.9917 7.22447 2.0592 7.44518 2.19163 7.62659C2.32405 7.80799 2.5137 7.93954 2.73 8.00003ZM21.5 16.29C21.4974 17.5013 21.015 18.6621 20.1586 19.5186C19.3021 20.3751 18.1412 20.8574 16.93 20.86H15.07C13.8588 20.8574 12.6979 20.3751 11.8414 19.5186C10.985 18.6621 10.5026 17.5013 10.5 16.29V10.11L15.73 11.56C15.906 11.6134 16.094 11.6134 16.27 11.56L21.5 10.11V16.29ZM16 4.05003L25.44 7.00003L16 9.56003L6.56 7.00003L16 4.05003Z" fill="#263238"/>
<path d="M25.78 23.38C25.664 23.2321 25.5086 23.1198 25.3318 23.0562C25.1549 22.9925 24.9637 22.98 24.78 23.02L16 25L7.21999 23C7.03632 22.96 6.84507 22.9725 6.6682 23.0362C6.49133 23.0998 6.33598 23.2121 6.21999 23.36L2.21999 28.36C2.10392 28.5064 2.03116 28.6823 2.00995 28.8679C1.98874 29.0534 2.01993 29.2413 2.09999 29.41C2.17815 29.5839 2.3044 29.7319 2.46385 29.8364C2.62331 29.9409 2.80933 29.9977 2.99999 30H29C29.1885 29.9995 29.373 29.9457 29.5322 29.8448C29.6914 29.744 29.8189 29.6002 29.9 29.43C29.98 29.2613 30.0112 29.0734 29.99 28.8879C29.9688 28.7023 29.8961 28.5264 29.78 28.38L25.78 23.38ZM5.07999 28L7.38999 25.11L15.78 27C15.9251 27.0299 16.0748 27.0299 16.22 27L24.61 25.13L26.92 28H5.07999Z" fill="#263238"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<g id="add-user-left-6" transform="translate(-2 -2)">
<path id="secondary" fill="#2ca9bc" d="M12,13h2a7,7,0,0,1,7,7h0a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1H5a7,7,0,0,1,7-7Z"/>
<path id="primary" d="M11,3.41A5.11,5.11,0,0,1,13,3a5,5,0,1,1-4.59,7" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="primary-2" data-name="primary" d="M7,5H3M5,7V3m9,10H12a7,7,0,0,0-7,7H5a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1h0A7,7,0,0,0,14,13Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 21C5 17.134 8.13401 14 12 14C15.866 14 19 17.134 19 21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
\ No newline at end of file
......@@ -6,11 +6,37 @@ import Button from '@mui/material/Button';
import UploadOutlined from '@ant-design/icons/lib/icons/UploadOutlined';
import AudioOutlined from '@ant-design/icons/lib/icons/AudioOutlined';
import { Link } from 'react-router-dom';
import { Box, Stack, } from '@mui/material';
import { APP_DEFAULT_PATH } from 'config';
import construction from 'assets/images/maintenance/under-construction.svg';
import {CardContent,IconButton,InputAdornment,Paper,TextField,Typography} from '@mui/material';
import CopyOutlined from '@ant-design/icons/lib/icons/CopyOutlined';
import AudioEmotionDetectService from '../../../../services/AudioEmotionDetection.js';
import { MuiFileInput } from 'mui-file-input';
import { useSnackbar } from 'notistack';
const List = () => {
const [audioBlob, setAudioBlob] = useState<Blob | undefined>(undefined);
const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder | undefined>(undefined);
const [isRecording, setIsRecording] = useState<boolean>(false);
const [audioUrl, setAudioUrl] = useState<string | undefined>(undefined);
const [value, setValue] = useState('');
const [file, setFile] = useState<File | string | null>(null);
const [loading, setLoading] = useState(false);
const [isUploadFile, setIsUploadFile] = useState<boolean | string | null>(true);
const handleDropSingleFile = (files: any) => {
if (files) {
setFile(
Object.assign(files, {
preview: URL.createObjectURL(files)
})
);
setAudioUrl(URL.createObjectURL(files));
}
};
const handleRecordStart = async () => {
// Clear the uploaded audio state when recording starts
......@@ -54,6 +80,53 @@ const List = () => {
// Handle case where uploaded file is not an audio file
}
};
const { enqueueSnackbar } = useSnackbar();
const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
setValue(event.target.value);
};
const onCopy = (text: string) => {
if (text) {
navigator.clipboard.writeText(text);
enqueueSnackbar('Copied!', { variant: 'success' });
}
};
// Audio Upload
const predictEmotionFromAudio = async () => {
console.log("OK75")
console.log(file);
if (file) {
setLoading(true);
const formData = new FormData();
//@ts-ignore
formData.append('audio_request', file, file.name);
try {
const response = await AudioEmotionDetectService.predictEmotionAudio(formData);
if (response.status == 200) {
console.log(response.data);
setValue(response.data.predicted_emotion);
} else {
enqueueSnackbar('Something went Wrong!', { variant: 'error' });
}
setLoading(false);
} catch (error) {
console.log(error);
setLoading(false);
enqueueSnackbar('Something went Wrong!', { variant: 'error' });
}
} else {
enqueueSnackbar('Please select a file.', { variant: 'warning' });
}
};
const checkEmotionUpload = () => {
if (isUploadFile) {
return 'contained';
} else {
return 'outlined';
}
};
return (
<MainCard content={false}>
......@@ -65,17 +138,20 @@ const List = () => {
<div style={{ textAlign: 'center' }}>
<input
type="file"
accept="audio/*"
onChange={handleUpload}
style={{ display: 'none' }}
id="audio-upload"
/>
<label htmlFor="audio-upload">
<Button
variant="contained"
// variant="contained"
variant={checkEmotionUpload()}
color="primary"
component="span"
startIcon={<UploadOutlined />}
onClick={() => {
setIsUploadFile(true);
}}
>
Upload
</Button>
......@@ -88,6 +164,49 @@ const List = () => {
>
{isRecording ? 'Stop Recording' : 'Record'}
</Button>
<Button
variant="contained"
disabled={loading}
onClick={() => {
predictEmotionFromAudio();
}}
>
Prediction
</Button>
<div>
<Typography variant="overline" sx={{ color: 'text.secondary' }}>
Predict Emotion
</Typography>
<TextField
fullWidth
value={value}
onChange={handleChange}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton onClick={() => onCopy(value)}>
<CopyOutlined />
</IconButton>
</InputAdornment>
)
}}
/>
</div>
<CardContent>
{/* ! Important */}
{/* @ts-ignore */}
<MuiFileInput value={file} onChange={handleDropSingleFile} inputProps={{ accept: 'audio/*' }} />
<Paper style={{ padding: '20px', marginTop: '15px' }}>
<Typography variant="h5" align="center" gutterBottom>
Preview
</Typography>
<div style={{ marginTop: '20px', textAlign: 'center' }}>
{file ? <video src={audioUrl} width="400" controls /> : <p>No Audio Selected ...</p>}
</div>
</Paper>
</CardContent>
{audioBlob && (
<audio controls>
<source src={URL.createObjectURL(audioBlob)} type="audio/wav" />
......@@ -104,12 +223,30 @@ const List = () => {
</MainCard>
</Grid>
<Grid item xs={12} md={6}>
<h2>3D Avatar</h2>
<MainCard>
{/* Content of the second card */}
{/* You can put your 3D avatar components here */}
</MainCard>
<h2>3D Avatar</h2>
<MainCard>
<Grid container spacing={4} direction="column" alignItems="center" justifyContent="center" sx={{ minHeight: '100vh', py: 2 }}>
<Grid item xs={12}>
<Box sx={{ width: { xs: 300, sm: 480 } }}>
<img src={construction} alt="mantis" style={{ width: '100%', height: 'auto' }} />
</Box>
</Grid>
<Grid item xs={12}>
<Stack spacing={2} justifyContent="center" alignItems="center">
<Typography align="center" variant="h1">
Under Construction
</Typography>
<Typography color="textSecondary" align="center" sx={{ width: '85%' }}>
Hey! Please check out this site later. We are doing some maintenance on it right now.
</Typography>
<Button component={Link} to={APP_DEFAULT_PATH} variant="contained">
Back To Home
</Button>
</Stack>
</Grid>
</Grid>
</MainCard>
</Grid>
</Grid>
</ScrollX>
</MainCard>
......
import React, { useEffect } from 'react';
// third party
import { useInView } from 'react-intersection-observer';
import { motion, useAnimation } from 'framer-motion';
// =============================|| LANDING - FADE IN ANIMATION ||============================= //
function Animation({ children, variants }: { children: React.ReactElement; variants: any }) {
const controls = useAnimation();
const [ref, inView] = useInView();
useEffect(() => {
if (inView) {
controls.start('visible');
}
}, [controls, inView]);
return (
<motion.div
ref={ref}
animate={controls}
initial="hidden"
transition={{
x: {
type: 'spring',
stiffness: 150,
damping: 30,
duration: 0.5
},
opacity: { duration: 1 }
}}
variants={variants}
>
{children}
</motion.div>
);
}
export default Animation;
// material-ui
import { Grid, Rating, Typography } from '@mui/material';
// third-party
import Slider from 'react-slick';
// project import
// project import
import Avatar from 'components/@extended/Avatar';
import MainCard from 'components/MainCard';
import ScrollX from 'components/ScrollX';
// assets
import imgfeature1 from 'assets/images/landing/img-user1.svg';
//types
// ================================|| TESTIMONIAL - ITEMS ||================================ //
interface Props {
item: { image: string; title: string; review: string; rating: number; client: string };
}
const Item = ({ item }: Props) => (
<MainCard sx={{ mx: 2 }} contentSX={{ p: 3 }}>
<Grid container spacing={1}>
<Grid item>
<Avatar src={item.image} alt="feature" />
</Grid>
<Grid item sm zeroMinWidth>
<Grid container spacing={1}>
<Grid item xs={12}>
<Typography variant="h5" sx={{ fontWeight: 600 }}>
{item.title}
</Typography>
<Rating name="read-only" readOnly value={item.rating} size="small" precision={0.5} />
</Grid>
<Grid item xs={12}>
<Typography variant="body1" color="secondary">
{item.review}
</Typography>
</Grid>
<Grid item xs={12}>
<Typography variant="subtitle2">{item.client}</Typography>
</Grid>
</Grid>
</Grid>
</Grid>
</MainCard>
);
// ==============================|| List ||============================== //
const List = () => {
const settings = {
autoplay: true,
arrows: false,
dots: false,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1
};
const items = [
{
image: imgfeature1,
title: 'Design Quality',
review:
'One of the better themes Ive used. Beautiful and clean design. Also included a NextJS project which is pretty rare in what Ive seen on MUI templates. Ultimately it didnt work out for my specific use case, but this is a well organized theme. Definitely keeping it in mind for future projects.',
rating: 5,
client: 'William S.'
},
{
image: imgfeature1,
title: 'Customizability',
review:
'Excellent design, you can use in a new project or include in your current project. Multiple components for any use. Good code quality. Great customer service and support.',
rating: 5,
client: 'Rodrigo J.'
},
{
image: imgfeature1,
title: 'Design Quality',
review: 'there is no mistake, great design and organized code, thank you ...',
rating: 4,
client: 'Yang Z.'
},
{
image: imgfeature1,
title: 'Code Quality',
review:
'Fantastic design and good code quality. Its a great starting point for any new project. They provide plenty of premade components, page views, and authentication options. Definitely the best Ive found for Material UI in Typescript',
rating: 5,
client: 'Felipe F.'
},
{
image: imgfeature1,
title: 'Code Quality ',
review:
'Great template. Very well written code and good structure. Very customizable and tons of nice components. Good documentation. Team is very responsive too.',
rating: 5,
client: 'Besart M.'
},
{
image: imgfeature1,
title: 'Code Quality',
review:
'We are just getting started with this new theme, but we liked it enough that we decided to import our application into this codebase rather than the other way around. Impressive number of custom components and original work VS some other themes that seem to just be repackaged versions of Material UI.',
rating: 5,
client: 'Oxbird'
}
];
return (
<MainCard content={false}>
<ScrollX>
</ScrollX>
</MainCard>
<Grid container spacing={2}>
<Grid item lg={12} md={12} xs={12} sx={{ '& .slick-list': { overflow: 'visible' } }}>
<Slider {...settings}>
{items.map((item, index) => (
<Item key={index} item={item} />
))}
</Slider>
</Grid>
<Grid item md={12}>
</Grid>
</Grid>
)
}
......
import axios from 'axios';
class SignLanguageToTextService {
predictSignLanguageVideo(speed, data) {
return axios.post(
`http://127.0.0.1:8000/predict-sign-language/video/speed_levels?speed=${speed}`,
data
);
}
}
export default new SignLanguageToTextService();
......@@ -271,7 +271,8 @@ const VideoTranslate = () => {
{/* Conditionally render the Unity WebGL build */}
{showUnityWebGL && (
<iframe
src="https://64f66d39fdef493229b2ddd9--lambent-unicorn-97396a.netlify.app/"
// src="https://64f66d39fdef493229b2ddd9--lambent-unicorn-97396a.netlify.app/"
src="https://64f7cfd336356b18eb42de2b--lambent-unicorn-97396a.netlify.app/"
width="700px"
height="700px" // Adjust the height as needed
title="Unity WebGL"
......
......@@ -38,7 +38,7 @@ const LearningCurriculums = Loadable(lazy(() => import('pages/learning-managemen
const LearningCurriculumsSubscribed = Loadable(lazy(() => import('pages/learning-management/learning-curriculums-subscribed/list/list')));
const LearningCurriculumsSubscribedTutorial = Loadable(lazy(() => import('pages/learning-management/learning-curriculums-subscribed/tutorial/tutorial')));
// const LearningLeadBoard = Loadable(lazy(() => import('pages/learning-management/learning-lead-board/list/list')));
// const LearningFeedBack = Loadable(lazy(() => import('pages/learning-management/learning-feedback/list/list')));
const LearningFeedBack = Loadable(lazy(() => import('pages/learning-management/learning-feedback/list/list')));
// render - parameter curriculum management page
const CurriculumManagementList = Loadable(lazy(() => import('pages/parameter/curriculum-management/list/list')));
......@@ -166,7 +166,7 @@ const MainRoutes = {
},
{
path: 'feedback',
element: <MaintenanceUnderConstruction />
element: <LearningFeedBack />
}
]
},
......
import axios from 'axios';
class AudioEmotionDetectService {
predictEmotionAudio(data) {
return axios.post(
`http://127.0.0.1:8000/predict_emotion/audio/`,
data
);
}
}
export default new AudioEmotionDetectService();
\ No newline at end of file
import axios from 'axios';
class VideoEmotionDetectService {
predictEmotionVideo(data) {
return axios.post(
`http://127.0.0.1:8000/predict_emotion/video/`,
data
);
}
}
export default new VideoEmotionDetectService();
\ No newline at end of file
......@@ -3,10 +3,8 @@ import axios from 'axios';
class VideoToSignLanguage {
videoTranslation(data) {
return axios.post(
// @ts-ignore
`http://127.0.0.1:8000/translated_items/`,
data
);
`http://127.0.0.1:8000/translated_items/`, data
);
}
}
......
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