Spaces:
Sleeping
Sleeping
AJ-Gazin
commited on
Commit
·
d134ba2
1
Parent(s):
f709b0a
loaded pyg to cpu
Browse files
app.py
CHANGED
@@ -27,9 +27,10 @@ API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffus
|
|
27 |
# --- LOAD DATA AND MODEL ---
|
28 |
# map_location forces the model to be loaded on the CPU for huggingface compatibility
|
29 |
movies_df = pd.read_csv("./sampled_movie_dataset/movies_metadata.csv") # Load your movie data
|
30 |
-
data = torch.load("./PyGdata.pt", map_location=device('cpu'))
|
31 |
-
|
32 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
|
|
|
33 |
model = model_def.Model(hidden_channels=32).to(device)
|
34 |
model.load_state_dict(torch.load("PyGTrainedModelState.pt", map_location=device('cpu')))
|
35 |
model.eval()
|
|
|
27 |
# --- LOAD DATA AND MODEL ---
|
28 |
# map_location forces the model to be loaded on the CPU for huggingface compatibility
|
29 |
movies_df = pd.read_csv("./sampled_movie_dataset/movies_metadata.csv") # Load your movie data
|
|
|
|
|
30 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
31 |
+
|
32 |
+
|
33 |
+
data = torch.load("./PyGdata.pt", map_location=device('cpu'))
|
34 |
model = model_def.Model(hidden_channels=32).to(device)
|
35 |
model.load_state_dict(torch.load("PyGTrainedModelState.pt", map_location=device('cpu')))
|
36 |
model.eval()
|