Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,10 +3,12 @@ import torch
|
|
| 3 |
from PIL import Image
|
| 4 |
from torchvision import transforms
|
| 5 |
import gradio as gr
|
| 6 |
-
|
| 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 |
model.eval()
|
| 11 |
# Download an example image from the pytorch website
|
| 12 |
torch.hub.download_url_to_file("https://github.com/pytorch/hub/raw/master/images/dog.jpg", "dog.jpg")
|
|
|
|
| 3 |
from PIL import Image
|
| 4 |
from torchvision import transforms
|
| 5 |
import gradio as gr
|
| 6 |
+
#https://huggingface.co/spaces/yuhe6/final_project/blob/main/CIFAR10_cnn.pth
|
| 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 |
+
model = torch.hub.load('', 'CIFAR10_cnn', pretrained=True)
|
| 11 |
+
|
| 12 |
model.eval()
|
| 13 |
# Download an example image from the pytorch website
|
| 14 |
torch.hub.download_url_to_file("https://github.com/pytorch/hub/raw/master/images/dog.jpg", "dog.jpg")
|