my-first-ai / app.py
bnoy1's picture
Create app.py
5ff1624 verified
raw
history blame contribute delete
415 Bytes
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()