santhoshraghu commited on
Commit
f6e8f8a
·
verified ·
1 Parent(s): a30ff95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -53,7 +53,7 @@ local_embedding = HuggingFaceEmbeddings(
53
  model_name="Alibaba-NLP/gte-Qwen2-1.5B-instruct",
54
  model_kwargs={
55
  "trust_remote_code": True,
56
- "device": "cuda" # or "cuda:0"
57
  }
58
  )
59
 
@@ -179,8 +179,6 @@ multiclass_model = DermNetViT(num_classes=len(multiclass_class_names))
179
  #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
180
  multilabel_model.load_state_dict(torch.load(multilabel_model_path, map_location="cpu"))
181
  multiclass_model.load_state_dict(torch.load(multiclass_model_path, map_location="cpu"))
182
- multilabel_model.to(device)
183
- multiclass_model.to(device)
184
 
185
 
186
  multilabel_model.eval()
 
53
  model_name="Alibaba-NLP/gte-Qwen2-1.5B-instruct",
54
  model_kwargs={
55
  "trust_remote_code": True,
56
+ "device": "gpu" # or "cuda:0"
57
  }
58
  )
59
 
 
179
  #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
180
  multilabel_model.load_state_dict(torch.load(multilabel_model_path, map_location="cpu"))
181
  multiclass_model.load_state_dict(torch.load(multiclass_model_path, map_location="cpu"))
 
 
182
 
183
 
184
  multilabel_model.eval()