File size: 415 Bytes
5ff1624
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
import random

def classify_emotion(image):
    emotions = ["ืฉืžื—", "ืขืฆื•ื‘", "ืžื•ืคืชืข", "ืขืฆื‘ื ื™", "ื ืœื”ื‘"]
    return random.choice(emotions)

interface = gr.Interface(
    fn=classify_emotion,
    inputs=gr.Image(type="pil"),
    outputs="text",
    title="ืžื ื—ืฉ ืจื’ืฉื•ืช",
    description="ื”ืขืœื• ืชืžื•ื ื” ื•ื ื’ืœื” ืื™ืš ืืชื ืžืจื’ื™ืฉื™ื!"
)

interface.launch()