xinyu1205 commited on
Commit
28ec2a0
1 Parent(s): f75f2a2

Update models/tag2text.py

Browse files
Files changed (1) hide show
  1. models/tag2text.py +2 -1
models/tag2text.py CHANGED
@@ -152,7 +152,8 @@ class RAM(nn.Module):
152
  self.class_threshold[key] = value
153
 
154
  def load_tag_list(self, tag_list_file):
155
- with open(tag_list_file, 'r') as f:
 
156
  tag_list = f.read().splitlines()
157
  tag_list = np.array(tag_list)
158
  return tag_list
 
152
  self.class_threshold[key] = value
153
 
154
  def load_tag_list(self, tag_list_file):
155
+ with open(tag_list_file, 'r', encoding="utf-8") as f:
156
+ # with open(tag_list_file, 'r') as f:
157
  tag_list = f.read().splitlines()
158
  tag_list = np.array(tag_list)
159
  return tag_list