Commit
·
21256b2
1
Parent(s):
f0af9fa
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ def check(text):
|
|
9 |
with torch.no_grad():
|
10 |
logits = model(**inputs).logits
|
11 |
predicted_class_id = logits.argmax().item()
|
|
|
12 |
return 'secure' if predicted_class_id==0 else 'insecure'
|
13 |
with gr.Blocks() as demo:
|
14 |
text = gr.Textbox(label="Text")
|
|
|
9 |
with torch.no_grad():
|
10 |
logits = model(**inputs).logits
|
11 |
predicted_class_id = logits.argmax().item()
|
12 |
+
print(f'{logits.argmax().item()}:{text}')
|
13 |
return 'secure' if predicted_class_id==0 else 'insecure'
|
14 |
with gr.Blocks() as demo:
|
15 |
text = gr.Textbox(label="Text")
|