yiren98 commited on
Commit
e4a7f40
·
1 Parent(s): 1dd7c81
Files changed (1) hide show
  1. gradio_app.py +2 -1
gradio_app.py CHANGED
@@ -14,6 +14,7 @@ import logging
14
  from huggingface_hub import login
15
  from huggingface_hub import hf_hub_download
16
 
 
17
 
18
  # Set up logger
19
  logger = logging.getLogger(__name__)
@@ -109,7 +110,7 @@ def load_target_model(selected_model):
109
  info = lora_model.load_state_dict(weights_sd, strict=True)
110
  logger.info(f"Loaded LoRA weights from {LORA_WEIGHTS_PATH}: {info}")
111
  lora_model.eval()
112
-
113
  except Exception as e:
114
  logger.error(f"Error loading models: {e}")
115
  raise
 
14
  from huggingface_hub import login
15
  from huggingface_hub import hf_hub_download
16
 
17
+ device = "cuda"
18
 
19
  # Set up logger
20
  logger = logging.getLogger(__name__)
 
110
  info = lora_model.load_state_dict(weights_sd, strict=True)
111
  logger.info(f"Loaded LoRA weights from {LORA_WEIGHTS_PATH}: {info}")
112
  lora_model.eval()
113
+
114
  except Exception as e:
115
  logger.error(f"Error loading models: {e}")
116
  raise