Spaces:
Runtime error
Runtime error
debug
Browse files
app.py
CHANGED
@@ -11,10 +11,10 @@ import gradio as gr
|
|
11 |
# Device on which to run the model
|
12 |
# Set to cuda to load on GPU
|
13 |
device = "cpu"
|
14 |
-
os.system("wget https://huggingface.co/Andy1621/uniformer/
|
15 |
# Pick a pretrained model
|
16 |
model = uniformer_small()
|
17 |
-
state_dict = torch.load('
|
18 |
model.load_state_dict(state_dict['model'])
|
19 |
|
20 |
# Set to eval mode and move to desired device
|
|
|
11 |
# Device on which to run the model
|
12 |
# Set to cuda to load on GPU
|
13 |
device = "cpu"
|
14 |
+
os.system("wget https://cdn-lfs.huggingface.co/Andy1621/uniformer/fd192c31f8bd77670de8f171111bd51f56fd87e6aea45043ab2edc181e1fa775")
|
15 |
# Pick a pretrained model
|
16 |
model = uniformer_small()
|
17 |
+
state_dict = torch.load('fd192c31f8bd77670de8f171111bd51f56fd87e6aea45043ab2edc181e1fa775', map_location='cpu')
|
18 |
model.load_state_dict(state_dict['model'])
|
19 |
|
20 |
# Set to eval mode and move to desired device
|