Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,8 @@ import gradio as gr
|
|
| 7 |
#os.system("wget https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt")
|
| 8 |
|
| 9 |
#model = torch.hub.load('huawei-noah/ghostnet', 'ghostnet_1x', pretrained=True)
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
model.eval()
|
| 13 |
# Download an example image from the pytorch website
|
|
|
|
| 7 |
#os.system("wget https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt")
|
| 8 |
|
| 9 |
#model = torch.hub.load('huawei-noah/ghostnet', 'ghostnet_1x', pretrained=True)
|
| 10 |
+
torch.hub.download_url_to_file('https://huggingface.co/spaces/yuhe6/final_project/blob/main/CIFAR10_cnn.pth', '/tmp/temporary_file')
|
| 11 |
+
model = torch.hub.load('/tmp/', 'temporary_file', pretrained=True)
|
| 12 |
|
| 13 |
model.eval()
|
| 14 |
# Download an example image from the pytorch website
|