CoolFace
Apppublic

Coder19/interview_system

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
emotion_api.py19 linesDownload Raw Back to api
1 2# from interview_select.speech_text import speech_to_text3# from interview_select.text_to_speech import text_to_speech4# from interview_select.interview_bot import ask_question, generate_bot_response5# from interview_select.interview_session import conduct_interview6from fastapi import APIRouter7import json8from interview_select.emotion import get_face_emotion9 10 11router = APIRouter()12 13\14@router.get("/emotion-detection/")15async def emotion_detection_route():16    """Captures emotion and confidence from the user's face"""17    emotion, confidence = get_face_emotion()18    return {"emotion": emotion, "confidence": confidence}19