Spaces:
Build error
Build error
Download app.py from william1324/gender-equality-classifier: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/spaces/william1324/gender-equality-classifier/resolve/main/app.py
- Command line
-
hf download hf://spaces/william1324/gender-equality-classifier/app.py
-
curl -L -o app.py https://huggingface.co/spaces/william1324/gender-equality-classifier/resolve/main/app.py
374 Bytes
| import gradio as gr | |
| def fake_predict(img): | |
| return { | |
| "女性醫護": 0.25, | |
| "男性醫護": 0.25, | |
| "女性工程師": 0.25, | |
| "男性工程師": 0.25 | |
| } | |
| # Gradio UI | |
| demo = gr.Interface( | |
| fn=fake_predict, | |
| inputs=gr.Image(type="pil"), | |
| outputs=gr.Label(num_top_classes=4), | |
| title="性別平等職業分類器", | |
| ) | |
| demo.launch() |