damerajee commited on
Commit
7885648
·
verified ·
1 Parent(s): 6f71967

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ from mingru_lm import MinGRU_LM
5
 
6
  model = MinGRU_LM(dim=512, num_tokens=256, num_layers=6)
7
  pt_model = "best_model.pt"
8
- checkpoint = torch.load(pt_model,map_location=torch.device('cpu'))
9
  model.load_state_dict(checkpoint['model_state_dict'])
10
 
11
  # Move model to GPU if available
@@ -57,4 +57,4 @@ iface = gr.Interface(
57
  )
58
 
59
  if __name__ == "__main__":
60
- iface.launch()
 
5
 
6
  model = MinGRU_LM(dim=512, num_tokens=256, num_layers=6)
7
  pt_model = "best_model.pt"
8
+ checkpoint = torch.load(pt_model,map_location=torch.device('cpu'),weights_only=True)
9
  model.load_state_dict(checkpoint['model_state_dict'])
10
 
11
  # Move model to GPU if available
 
57
  )
58
 
59
  if __name__ == "__main__":
60
+ iface.launch(show_api=False, server_name="0.0.0.0")