File size: 932 Bytes
85a4630
63930b1
b9b0783
 
e9c5417
 
b9b0783
63930b1
b9b0783
 
 
 
85a4630
b9b0783
63930b1
85a4630
b9b0783
e9c5417
85a4630
b9b0783
 
85a4630
 
b9b0783
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr

# قاعدة بيانات الأماكن السياحية
destinations = {
    "بارد": {"name": "أبها", "image": "https://example.com/abha.jpg"},
    "شاطئ": {"name": "الشرقية", "image": "https://example.com/eastern_province.jpg"}
}

def recommend_destination(weather_preference):
    if weather_preference in destinations:
        destination = destinations[weather_preference]
        return destination["name"], destination["image"]
    else:
        return "لم يتم العثور على وجهة سياحية.", None

iface = gr.Interface(
    fn=recommend_destination,
    inputs=gr.Radio(["بارد", "شاطئ"], label="اختر نوع الطقس المفضل"),
    outputs=["text", "image"],
    title="توصية أماكن سياحية",
    description="نساعدك لاختيار أفضل وجهة سياحية بناءً على تفضيلات الطقس."
)

iface.launch()