| import gradio as gr | |
| from python import get_outfit | |
| def recommend_outfit(season, gender, occasion): | |
| return get_outfit(season, gender, occasion) | |
| iface = gr.Interface( | |
| fn=recommend_outfit, | |
| inputs=[ | |
| gr.Dropdown(["夏季", "冬季"], label="季節"), | |
| gr.Dropdown(["女生", "男生"], label="性別"), | |
| gr.Dropdown(["約會", "上班", "出遊"], label="場合") | |
| ], | |
| outputs="text", | |
| title="👗 穿搭小幫手 進階版", | |
| description="根據你的季節、性別、場合,推薦適合的穿搭!" | |
| ) | |
| iface.launch() | |