selbl commited on
Commit
d508cb1
1 Parent(s): 8920a14

Update StreamlitModel.py

Browse files
Files changed (1) hide show
  1. StreamlitModel.py +2 -2
StreamlitModel.py CHANGED
@@ -20,8 +20,8 @@ import torch.hub
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
 
 
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