Amani / app.py
amaniM's picture
Create app.py
e9c5417 verified
raw
history blame contribute delete
932 Bytes
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()