File size: 621 Bytes
edccd79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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