test4 / app.py
ShahadFawaz99's picture
Create app.py
7a91df3 verified
raw
history blame
558 Bytes
import gradio as gr
import speech_recognition as sr
# دالة التصنيف
def classify_location(item):
kitchen_items = ["قهوة", "مطبخ", "مقلاة", "ثلاجة", "خلاط"]
bathroom_items = ["صابون", "منشفة", "فرشاة أسنان", "شامبو", "مرآة"]
bedroom_items = ["سرير", "وسادة", "لحاف", "خزانة", "منبه"]
if any(word in item.lower() for word in kitchen_items):
return "📍 المطبخ"
elif any(word in item.lower() for word in bathroom_items):
return "📍