Spaces:
Build error
Build error
Download app.py from brainai-projects/Emotion_Detection_With_Gradio: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/brainai-projects/Emotion_Detection_With_Gradio/resolve/main/app.py
- Command line
-
hf download hf://spaces/brainai-projects/Emotion_Detection_With_Gradio/app.py
-
curl -L -o app.py https://huggingface.co/spaces/brainai-projects/Emotion_Detection_With_Gradio/resolve/main/app.py
621 Bytes
| import gradio as gr | |
| import cv2 | |
| from utils import emotion_detection_brainai as edb | |
| emotion_model = edb.EmotionModel() | |
| def detect_emotion(img): | |
| result_img = emotion_model.process(img) | |
| return result_img | |
| demo = gr.Interface( | |
| fn=detect_emotion, | |
| examples=[ | |
| "data/face.jpg", | |
| "data/emotions.jpg" | |
| ], | |
| inputs=gr.Image(label="이미지 업로드"), | |
| outputs=gr.Image(label="AI 추론 결과 확인") | |
| ) | |
| demo.launch() | |
| ## 활용 모델 | |
| # 문서 1: https://docs.openvino.ai/2024/notebooks/ddcolor-image-colorization-with-output.html | |
| # 모델: https://github.com/piddnad/DDColor |