Update script.py
Browse files
script.py
CHANGED
|
@@ -23,14 +23,14 @@ from preprocess import preprocess
|
|
| 23 |
DATASET_PATH = "/tmp/data"
|
| 24 |
dataset_remote = load_dataset(DATASET_PATH,split = "test",streaming = True)
|
| 25 |
|
| 26 |
-
# this should fail since there is not network access during model run
|
| 27 |
-
try:
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
except Exception as e:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
# load your model
|
| 36 |
device = "cuda:0"
|
|
|
|
| 23 |
DATASET_PATH = "/tmp/data"
|
| 24 |
dataset_remote = load_dataset(DATASET_PATH,split = "test",streaming = True)
|
| 25 |
|
| 26 |
+
# # this should fail since there is not network access during model run
|
| 27 |
+
# try:
|
| 28 |
+
# import requests
|
| 29 |
+
# r = requests.get("https://stresearch.github.io/SAFE/logo.jpg")
|
| 30 |
+
# print(r.text)
|
| 31 |
+
# except Exception as e:
|
| 32 |
+
# print("download test faild as expected")
|
| 33 |
+
# print(e)
|
| 34 |
|
| 35 |
# load your model
|
| 36 |
device = "cuda:0"
|