Spaces:
Runtime error
Runtime error
ShahadFawaz99
commited on
Commit
•
7a91df3
1
Parent(s):
802d4d0
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import speech_recognition as sr
|
3 |
+
|
4 |
+
# دالة التصنيف
|
5 |
+
def classify_location(item):
|
6 |
+
kitchen_items = ["قهوة", "مطبخ", "مقلاة", "ثلاجة", "خلاط"]
|
7 |
+
bathroom_items = ["صابون", "منشفة", "فرشاة أسنان", "شامبو", "مرآة"]
|
8 |
+
bedroom_items = ["سرير", "وسادة", "لحاف", "خزانة", "منبه"]
|
9 |
+
|
10 |
+
if any(word in item.lower() for word in kitchen_items):
|
11 |
+
return "📍 المطبخ"
|
12 |
+
elif any(word in item.lower() for word in bathroom_items):
|
13 |
+
return "📍
|