mathminakshi commited on
Commit
e9f0135
·
verified ·
1 Parent(s): fc6aa6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ def get_model():
10
  model = GPT(GPTConfig())
11
  # Load from the Hugging Face Hub instead of local file
12
  model_path = 'mathminakshi/custom_gpt2'
13
- model.load_state_dict(torch.hub.load_state_dict_from_url(f'https://huggingface.co/{model_path}/resolve/main/best_model.pth', map_location='cpu')['model_state_dict'])
14
  model.eval()
15
  return model
16
 
 
10
  model = GPT(GPTConfig())
11
  # Load from the Hugging Face Hub instead of local file
12
  model_path = 'mathminakshi/custom_gpt2'
13
+ model.load_state_dict(torch.hub.load_state_dict_from_url(f'https://huggingface.co/{model_path}/resolve/main/model.pth', map_location='cpu'))
14
  model.eval()
15
  return model
16