zamborg commited on
Commit
1599f11
1 Parent(s): 8b7cae6

once again is not -> != ; weird python versioning error causing this?

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -87,7 +87,7 @@ class VirTexModel:
87
  )
88
  subreddit_tokens = torch.tensor(subreddit_tokens, device=self.device).long()
89
 
90
- if prompt is not "":
91
  # at present prompts without subreddits will break without this change
92
  # TODO FIX
93
  cap_tokens = self.tokenizer.encode(prompt)
@@ -129,7 +129,7 @@ class VirTexModel:
129
  subreddit, rest_of_caption = "", caption.strip()
130
 
131
  # split prompt for coloring:
132
- if prompt is not "":
133
  _, rest_of_caption = caption.split(prompt.strip())
134
 
135
  is_valid_subreddit = subreddit in self.valid_subs
 
87
  )
88
  subreddit_tokens = torch.tensor(subreddit_tokens, device=self.device).long()
89
 
90
+ if prompt != "":
91
  # at present prompts without subreddits will break without this change
92
  # TODO FIX
93
  cap_tokens = self.tokenizer.encode(prompt)
 
129
  subreddit, rest_of_caption = "", caption.strip()
130
 
131
  # split prompt for coloring:
132
+ if prompt != "":
133
  _, rest_of_caption = caption.split(prompt.strip())
134
 
135
  is_valid_subreddit = subreddit in self.valid_subs