mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 14:43:57 -05:00
wikimedia wasn't returning 200
This commit is contained in:
@@ -129,7 +129,7 @@ While more ops may be added, I think this base is stable.
|
||||
Despite being tiny, tinygrad supports the full EfficientNet. Pass in a picture to discover what it is.
|
||||
|
||||
```bash
|
||||
ipython3 examples/efficientnet.py https://upload.wikimedia.org/wikipedia/commons/4/41/Chicken.jpg
|
||||
ipython3 examples/efficientnet.py https://media.istockphoto.com/photos/hen-picture-id831791190
|
||||
```
|
||||
|
||||
Or, if you have a webcam and cv2 installed
|
||||
|
||||
@@ -11,7 +11,9 @@ def fetch(url):
|
||||
dat = f.read()
|
||||
else:
|
||||
print("fetching %s" % url)
|
||||
dat = requests.get(url).content
|
||||
r = requests.get(url)
|
||||
assert r.status_code == 200
|
||||
dat = r.content
|
||||
with open(fp+".tmp", "wb") as f:
|
||||
f.write(dat)
|
||||
os.rename(fp+".tmp", fp)
|
||||
|
||||
Reference in New Issue
Block a user