selbl commited on
Commit
4a37fb4
1 Parent(s): 637f1ec

Update StreamlitModel.py

Browse files
Files changed (1) hide show
  1. StreamlitModel.py +3 -1
StreamlitModel.py CHANGED
@@ -19,7 +19,9 @@ import torch.hub
19
 
20
  profanity.load_censor_words()
21
 
22
- device = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_built() else 'cpu'
 
 
23
 
24
  class GPT2_Model(GPT2PreTrainedModel):
25
 
 
19
 
20
  profanity.load_censor_words()
21
 
22
+ #It seems the streamlit space does not allow mps
23
+ #device = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_built() else 'cpu'
24
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
25
 
26
  class GPT2_Model(GPT2PreTrainedModel):
27