Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
# 模擬預測函式(無模型,僅回傳固定結果)
|
4 |
def fake_predict(img):
|
5 |
return {
|
6 |
"女性醫護": 0.25,
|
@@ -15,7 +14,6 @@ demo = gr.Interface(
|
|
15 |
inputs=gr.Image(type="pil"),
|
16 |
outputs=gr.Label(num_top_classes=4),
|
17 |
title="性別平等職業分類器",
|
18 |
-
description="(展示介面)上傳圖片,將模擬分類為:女性醫護、男性醫護、女性工程師、男性工程師。"
|
19 |
)
|
20 |
|
21 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
3 |
def fake_predict(img):
|
4 |
return {
|
5 |
"女性醫護": 0.25,
|
|
|
14 |
inputs=gr.Image(type="pil"),
|
15 |
outputs=gr.Label(num_top_classes=4),
|
16 |
title="性別平等職業分類器",
|
|
|
17 |
)
|
18 |
|
19 |
demo.launch()
|