yash commited on
Commit
a4397b2
·
1 Parent(s): 609c11f

gpu to cpu_2

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ transformer = Transformer(d_model,
67
  PADDING_TOKEN)
68
 
69
  model_file = hf_hub_download(repo_id="yashAI007/English_to_Gujarati_Translation", filename="model.pth")
70
- model = torch.load(model_file)
71
  transformer.load_state_dict(model['model_state_dict'])
72
  transformer.to(device)
73
  transformer.eval()
 
67
  PADDING_TOKEN)
68
 
69
  model_file = hf_hub_download(repo_id="yashAI007/English_to_Gujarati_Translation", filename="model.pth")
70
+ model = torch.load(model_file,map_location='cpu')
71
  transformer.load_state_dict(model['model_state_dict'])
72
  transformer.to(device)
73
  transformer.eval()