parkermoe commited on
Commit
8d4900c
·
1 Parent(s): 66557e5

'fix path'

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -36,19 +36,19 @@ class LSTMModel(nn.Module):
36
  model = LSTMModel(VOCAB_SIZE, EMBEDDING_DIM, N_UNITS).to(device)
37
 
38
 
39
- checkpoint_path = 'RecipeGenerator/checkpoint_epoch_99.pth'
40
  checkpoint = torch.load(checkpoint_path)
41
  model.load_state_dict(checkpoint['model_state_dict'])
42
  print('Loaded model from checkpoint')
43
 
44
  def load_vocab(directory):
45
- file_path = os.path.join(directory, 'RecipeGenerator/vocab.pkl')
46
  with open(file_path, 'rb') as input:
47
  vocab = pickle.load(input)
48
  print(f"Vocabulary loaded from {file_path}")
49
  return vocab
50
 
51
- vocab = load_vocab('RecipeGenerator/vocab.pkl')
52
 
53
 
54
 
 
36
  model = LSTMModel(VOCAB_SIZE, EMBEDDING_DIM, N_UNITS).to(device)
37
 
38
 
39
+ checkpoint_path = 'checkpoint_epoch_99.pth'
40
  checkpoint = torch.load(checkpoint_path)
41
  model.load_state_dict(checkpoint['model_state_dict'])
42
  print('Loaded model from checkpoint')
43
 
44
  def load_vocab(directory):
45
+ file_path = os.path.join(directory, 'vocab.pkl')
46
  with open(file_path, 'rb') as input:
47
  vocab = pickle.load(input)
48
  print(f"Vocabulary loaded from {file_path}")
49
  return vocab
50
 
51
+ vocab = load_vocab('vocab.pkl')
52
 
53
 
54