Spaces:
Runtime error
Runtime error
i dummy pt3 -> forgot to convert to tensor
Browse files
model.py
CHANGED
|
@@ -60,6 +60,7 @@ class VirTexModel():
|
|
| 60 |
self.tokenizer.encode(subreddit_tokens) +
|
| 61 |
[self.tokenizer.token_to_id("[SEP]")]
|
| 62 |
)
|
|
|
|
| 63 |
|
| 64 |
|
| 65 |
predictions: List[Dict[str, Any]] = []
|
|
|
|
| 60 |
self.tokenizer.encode(subreddit_tokens) +
|
| 61 |
[self.tokenizer.token_to_id("[SEP]")]
|
| 62 |
)
|
| 63 |
+
subreddit_tokens = torch.tensor(subreddit_tokens, device=self.device).long()
|
| 64 |
|
| 65 |
|
| 66 |
predictions: List[Dict[str, Any]] = []
|