Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,7 +69,6 @@ def analyze_and_predict(*all_answers):
|
|
| 69 |
|
| 70 |
with torch.no_grad():
|
| 71 |
feats = model(sx1, sx2)
|
| 72 |
-
# 確保 metric_fc 初始化時是 ArcMarginProduct(32, 2)
|
| 73 |
logits = metric_fc.predict(feats)
|
| 74 |
probs = torch.softmax(logits, dim=1)
|
| 75 |
pred_idx = torch.argmax(probs, dim=1).item()
|
|
@@ -127,7 +126,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".scroll-box { height: 400px; overflo
|
|
| 127 |
res_prob = gr.Label(label="模型信心分佈")
|
| 128 |
|
| 129 |
gr.Markdown("---")
|
| 130 |
-
reset_btn = gr.Button("
|
| 131 |
|
| 132 |
|
| 133 |
all_inputs = all_ccmq + all_osdi
|
|
|
|
| 69 |
|
| 70 |
with torch.no_grad():
|
| 71 |
feats = model(sx1, sx2)
|
|
|
|
| 72 |
logits = metric_fc.predict(feats)
|
| 73 |
probs = torch.softmax(logits, dim=1)
|
| 74 |
pred_idx = torch.argmax(probs, dim=1).item()
|
|
|
|
| 126 |
res_prob = gr.Label(label="模型信心分佈")
|
| 127 |
|
| 128 |
gr.Markdown("---")
|
| 129 |
+
reset_btn = gr.Button(" 清除重新開始")
|
| 130 |
|
| 131 |
|
| 132 |
all_inputs = all_ccmq + all_osdi
|