Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def classify(text):
|
|
17 |
probs = torch.softmax(outputs.logits, dim=1)
|
18 |
pred = torch.argmax(probs, dim=1).item()
|
19 |
confidence = probs[0][pred].item()
|
20 |
-
return f"🧠 预测 / Prediction: {labels[pred]}\n
|
21 |
|
22 |
# Gradio 界面
|
23 |
interface = gr.Interface(
|
|
|
17 |
probs = torch.softmax(outputs.logits, dim=1)
|
18 |
pred = torch.argmax(probs, dim=1).item()
|
19 |
confidence = probs[0][pred].item()
|
20 |
+
return f"🧠 预测 / Prediction: {labels[pred]}\n"
|
21 |
|
22 |
# Gradio 界面
|
23 |
interface = gr.Interface(
|