Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,4 +16,4 @@ def predict_fake(title,text):
|
|
16 |
output = model(input_ids["input_ids"].to(device), attention_mask=input_ids["attention_mask"].to(device))
|
17 |
return dict(zip(["Fake","Real"], [x.item() for x in list(torch.nn.Softmax()(output.logits)[0])] ))
|
18 |
|
19 |
-
|
|
|
16 |
output = model(input_ids["input_ids"].to(device), attention_mask=input_ids["attention_mask"].to(device))
|
17 |
return dict(zip(["Fake","Real"], [x.item() for x in list(torch.nn.Softmax()(output.logits)[0])] ))
|
18 |
|
19 |
+
gr.Interface(fn=predict_fake, inputs=[gr.Textbox(lines=1,label="headline"), gr.Textbox(lines=6,label="content")], outputs=gr.Label()).launch(share=True)
|