Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,23 +1,19 @@
|
|
| 1 |
-
|
| 2 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
-
- image-classification
|
| 5 |
-
-
|
| 6 |
-
- tensorflow
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
library_name: tensorflow
|
| 10 |
---
|
| 11 |
|
| 12 |
# 🌼 مُصنّف الزهور باللغة العربية
|
| 13 |
|
| 14 |
-
|
| 15 |
-
- أقحوان
|
| 16 |
-
- هندباء
|
| 17 |
-
- توليب
|
| 18 |
-
- عباد الشمس
|
| 19 |
-
|
| 20 |
-
تم تدريبه باستخدام TensorFlow على مجموعة صور الزهور الشهيرة.
|
| 21 |
-
|
| 22 |
-
## 🖥️ واجهة تفاعلية
|
| 23 |
-
يتم تشغيل واجهة Gradio تلقائيًا عند فتح الصفحة.
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: مُصنّف الزهور (عربي)
|
| 3 |
+
emoji: 🌼
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: yellow
|
| 6 |
+
sdk: gradio
|
| 7 |
+
app_file: app.py
|
| 8 |
+
short_description: تصنيف صور الزهور إلى 4 أنواع باللغة العربية
|
| 9 |
tags:
|
| 10 |
+
- image-classification
|
| 11 |
+
- arabic
|
| 12 |
+
- tensorflow
|
| 13 |
+
- gradio
|
| 14 |
+
- flowers
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# 🌼 مُصنّف الزهور باللغة العربية
|
| 18 |
|
| 19 |
+
يصنّف الصور إلى: أقحوان، هندباء، توليب، عباد الشمس.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -5,13 +5,11 @@ import tensorflow as tf
|
|
| 5 |
import gradio as gr
|
| 6 |
import json
|
| 7 |
|
| 8 |
-
# تحميل أسماء الفئات
|
| 9 |
with open("class_names.json", "r", encoding="utf-8") as f:
|
| 10 |
index_to_arabic = json.load(f)
|
| 11 |
index_to_arabic = {int(k): v for k, v in index_to_arabic.items()}
|
| 12 |
arabic_names = [index_to_arabic[i] for i in sorted(index_to_arabic.keys())]
|
| 13 |
|
| 14 |
-
# تحميل النموذج
|
| 15 |
model = tf.keras.models.load_model("model.h5")
|
| 16 |
|
| 17 |
def predict_flower(img):
|
|
@@ -32,7 +30,7 @@ iface = gr.Interface(
|
|
| 32 |
inputs=gr.Image(type="pil", label="ارفع صورة زهرة 🌸"),
|
| 33 |
outputs=gr.Label(),
|
| 34 |
title="🌼 مُصنّف الزهور (عربي)",
|
| 35 |
-
description="يدعم: أقحوان، هندباء، توليب،
|
| 36 |
)
|
| 37 |
|
| 38 |
if __name__ == "__main__":
|
|
|
|
| 5 |
import gradio as gr
|
| 6 |
import json
|
| 7 |
|
|
|
|
| 8 |
with open("class_names.json", "r", encoding="utf-8") as f:
|
| 9 |
index_to_arabic = json.load(f)
|
| 10 |
index_to_arabic = {int(k): v for k, v in index_to_arabic.items()}
|
| 11 |
arabic_names = [index_to_arabic[i] for i in sorted(index_to_arabic.keys())]
|
| 12 |
|
|
|
|
| 13 |
model = tf.keras.models.load_model("model.h5")
|
| 14 |
|
| 15 |
def predict_flower(img):
|
|
|
|
| 30 |
inputs=gr.Image(type="pil", label="ارفع صورة زهرة 🌸"),
|
| 31 |
outputs=gr.Label(),
|
| 32 |
title="🌼 مُصنّف الزهور (عربي)",
|
| 33 |
+
description="يدعم: أقحوان، هندباء، توليب، عباد الشمس"
|
| 34 |
)
|
| 35 |
|
| 36 |
if __name__ == "__main__":
|