bvd757 commited on
Commit
afd8852
·
1 Parent(s): 1eeb83f

app fixes_v2

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -124,13 +124,14 @@ def forward(self,
124
  def load_model(test=False):
125
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
126
  try:
127
- path = 'Papers_classification'
128
  with open(f'{path}/label_to_theme.json', 'r') as f:
129
  label_to_theme = json.load(f)
130
  except:
131
- path = '/Users/bvd757/my_documents/Машинное обучение 2/Howework4'
132
  with open(f'{path}/label_to_theme.json', 'r') as f:
133
  label_to_theme = json.load(f)
 
134
 
135
  class_weights = torch.load(f'{path}/class_weights.pth').to(device)
136
 
 
124
  def load_model(test=False):
125
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
126
  try:
127
+ path = '/Users/bvd757/my_documents/Машинное обучение 2/Howework4'
128
  with open(f'{path}/label_to_theme.json', 'r') as f:
129
  label_to_theme = json.load(f)
130
  except:
131
+ path = ''
132
  with open(f'{path}/label_to_theme.json', 'r') as f:
133
  label_to_theme = json.load(f)
134
+
135
 
136
  class_weights = torch.load(f'{path}/class_weights.pth').to(device)
137