Sadjad Alikhani commited on
Commit
c4819db
·
verified ·
1 Parent(s): a9cf28a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -54,8 +54,7 @@ def load_custom_model():
54
  def process_p_file(uploaded_file, percentage_idx, complexity_idx):
55
  capture = PrintCapture()
56
  sys.stdout = capture # Redirect print statements to capture
57
- print("a")
58
- print("b")
59
  try:
60
  model_repo_url = "https://huggingface.co/sadjadalikhani/LWM"
61
  model_repo_dir = "./LWM"
@@ -71,7 +70,7 @@ def process_p_file(uploaded_file, percentage_idx, complexity_idx):
71
  return f"Directory {model_repo_dir} does not exist."
72
 
73
  from lwm_model import LWM
74
- device = 'cuda' if torch.cuda.is_available() else 'cpu'
75
  print(f"Loading the LWM model on {device}...")
76
  model = LWM.from_pretrained(device=device)
77
 
 
54
  def process_p_file(uploaded_file, percentage_idx, complexity_idx):
55
  capture = PrintCapture()
56
  sys.stdout = capture # Redirect print statements to capture
57
+
 
58
  try:
59
  model_repo_url = "https://huggingface.co/sadjadalikhani/LWM"
60
  model_repo_dir = "./LWM"
 
70
  return f"Directory {model_repo_dir} does not exist."
71
 
72
  from lwm_model import LWM
73
+ device = 'cpu'
74
  print(f"Loading the LWM model on {device}...")
75
  model = LWM.from_pretrained(device=device)
76