Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
-
|
2 |
-
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
3 |
|
4 |
-
|
5 |
-
model = AutoModelForImageClassification.from_pretrained("microsoft/resnet-18")
|
6 |
|
7 |
import requests # 用於發送 HTTP 請求
|
8 |
from PIL import Image
|
|
|
1 |
+
import torch
|
|
|
2 |
|
3 |
+
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet18', pretrained=True).eval() # evaluation
|
|
|
4 |
|
5 |
import requests # 用於發送 HTTP 請求
|
6 |
from PIL import Image
|