Spaces:
Sleeping
Sleeping
kaitehtzeng
commited on
Commit
•
2f6ff4f
1
Parent(s):
81cd130
Update app.py
Browse files
app.py
CHANGED
@@ -169,7 +169,7 @@ def trial(text):
|
|
169 |
"token_type_ids": torch.tensor(tokenized['token_type_ids'],dtype=torch.long),
|
170 |
"attention_mask": torch.tensor(tokenized['attention_mask'],dtype = torch.long)
|
171 |
}
|
172 |
-
inputs = {k:inputs[k].unsqueeze(0)
|
173 |
|
174 |
if model(inputs).item()>=0.5:
|
175 |
return "AI"
|
|
|
169 |
"token_type_ids": torch.tensor(tokenized['token_type_ids'],dtype=torch.long),
|
170 |
"attention_mask": torch.tensor(tokenized['attention_mask'],dtype = torch.long)
|
171 |
}
|
172 |
+
inputs = {k:inputs[k].unsqueeze(0) for k in inputs.keys()}
|
173 |
|
174 |
if model(inputs).item()>=0.5:
|
175 |
return "AI"
|