Spaces:
Runtime error
Runtime error
updated post domination
Browse files
model.py
CHANGED
@@ -83,7 +83,12 @@ class VirTexModel():
|
|
83 |
if True: #sub_prompt is not None:
|
84 |
cap_tokens = self.tokenizer.encode(prompt)
|
85 |
cap_tokens = torch.tensor(cap_tokens, device=self.device).long()
|
86 |
-
subreddit_tokens = torch.cat(
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
|
89 |
predictions: List[Dict[str, Any]] = []
|
|
|
83 |
if True: #sub_prompt is not None:
|
84 |
cap_tokens = self.tokenizer.encode(prompt)
|
85 |
cap_tokens = torch.tensor(cap_tokens, device=self.device).long()
|
86 |
+
subreddit_tokens = torch.cat(
|
87 |
+
[
|
88 |
+
subreddit_tokens,
|
89 |
+
torch.tensor([self.tokenizer.token_to_id("[SEP]")], device=self.device).long(),
|
90 |
+
cap_tokens
|
91 |
+
])
|
92 |
|
93 |
|
94 |
predictions: List[Dict[str, Any]] = []
|