Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,11 +40,7 @@ def inference(prompt):
|
|
40 |
predicted_class_id = bi_prob.argmax().item()
|
41 |
class_id = model.config.id2label[predicted_class_id]
|
42 |
|
43 |
-
return
|
44 |
-
"class_id": class_id,
|
45 |
-
"clean_prob": bi_prob[0][0].item(),
|
46 |
-
"unclean_prob": bi_prob[0][1].item()
|
47 |
-
}
|
48 |
|
49 |
demo = gr.Interface(
|
50 |
fn=inference,
|
|
|
40 |
predicted_class_id = bi_prob.argmax().item()
|
41 |
class_id = model.config.id2label[predicted_class_id]
|
42 |
|
43 |
+
return "class_id: " + str(class_id) + "\n" + "clean_prob: " + str(bi_prob[0][0].item()) + "\n" + "unclean_prob: " + str(bi_prob[0][1].item())
|
|
|
|
|
|
|
|
|
44 |
|
45 |
demo = gr.Interface(
|
46 |
fn=inference,
|