Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ import gradio as gr
|
|
29 |
|
30 |
device = 'cpu'
|
31 |
le = LabelEncoder()
|
32 |
-
le = joblib.load("
|
33 |
|
34 |
class ModelPre(torch.nn.Module):
|
35 |
def __init__(self):
|
@@ -45,7 +45,7 @@ class ModelPre(torch.nn.Module):
|
|
45 |
def forward(self, data):
|
46 |
return self.embedding(data)
|
47 |
|
48 |
-
model = torch.load("
|
49 |
|
50 |
modelm = ModelPre()
|
51 |
modelm.load_state_dict(model['model'])
|
|
|
29 |
|
30 |
device = 'cpu'
|
31 |
le = LabelEncoder()
|
32 |
+
le = joblib.load("SVD/le.gz")
|
33 |
|
34 |
class ModelPre(torch.nn.Module):
|
35 |
def __init__(self):
|
|
|
45 |
def forward(self, data):
|
46 |
return self.embedding(data)
|
47 |
|
48 |
+
model = torch.load("SVD/GeoG.pth", map_location=torch.device(device))
|
49 |
|
50 |
modelm = ModelPre()
|
51 |
modelm.load_state_dict(model['model'])
|