Spaces:
Sleeping
Sleeping
test
Browse files- main.py +2 -0
- requirements.txt +1 -0
main.py
CHANGED
@@ -3,6 +3,8 @@ import torch
|
|
3 |
import requests
|
4 |
from torchvision import transforms
|
5 |
|
|
|
|
|
6 |
model = torch.hub.load("pytorch/vision:v0.6.0", "resnet18", pretrained=True).eval()
|
7 |
response = requests.get("https://git.io/JJkYN")
|
8 |
labels = response.text.split("\n")
|
|
|
3 |
import requests
|
4 |
from torchvision import transforms
|
5 |
|
6 |
+
torch.hub._validate_not_a_forked_repo=lambda a,b,c: True
|
7 |
+
|
8 |
model = torch.hub.load("pytorch/vision:v0.6.0", "resnet18", pretrained=True).eval()
|
9 |
response = requests.get("https://git.io/JJkYN")
|
10 |
labels = response.text.split("\n")
|
requirements.txt
CHANGED
@@ -15,3 +15,4 @@ protobuf==3.20.1
|
|
15 |
fastapi==0.74.*
|
16 |
requests==2.27.*
|
17 |
gradio
|
|
|
|
15 |
fastapi==0.74.*
|
16 |
requests==2.27.*
|
17 |
gradio
|
18 |
+
pydantic==1.7.1
|