dwb2023 commited on
Commit
afca0e4
·
verified ·
1 Parent(s): fc948d0

Update app.py

Browse files

trust_remote_code=True

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def get_model_summary(model_name):
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
 
16
  # Load the model and move it to the selected device
17
- model = AutoModel.from_pretrained(model_name).to(device)
18
 
19
  # Return the model's architecture as a string
20
  return str(model)
 
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
 
16
  # Load the model and move it to the selected device
17
+ model = AutoModel.from_pretrained(model_name, trust_remote_code=True).to(device)
18
 
19
  # Return the model's architecture as a string
20
  return str(model)