mario commited on
Commit
8a276eb
1 Parent(s): c68f5ab

Model loads to CPU now:

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,7 +75,7 @@ def load_model():
75
  url = 'https://drive.google.com/uc?id=1KO-QXUBfwzjauWLhiVi9StD3y0GtiBbj'
76
  gdown.download(url, model_path, quiet=False)
77
 
78
- model = torch.load(model_path)
79
  model.to(device)
80
 
81
  return model
@@ -141,4 +141,4 @@ team in this task achieved an F1 score of around 70.
141
  We believe that the low overall scores are due to the dataset's tagging process, as it appeared inconsistent and at times inaccurate.
142
  """
143
 
144
- st.markdown(text, unsafe_allow_html=True)
 
75
  url = 'https://drive.google.com/uc?id=1KO-QXUBfwzjauWLhiVi9StD3y0GtiBbj'
76
  gdown.download(url, model_path, quiet=False)
77
 
78
+ model = torch.load(model_path, map_location=torch.device('cpu'))
79
  model.to(device)
80
 
81
  return model
 
141
  We believe that the low overall scores are due to the dataset's tagging process, as it appeared inconsistent and at times inaccurate.
142
  """
143
 
144
+ st.markdown(text, unsafe_allow_html=True)