Spaces:
Running
Running
Sadjad Alikhani
commited on
Update app.py
Browse files
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 |
-
|
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 = '
|
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 |
|