Spaces:
Runtime error
Runtime error
Ubuntu
commited on
Commit
·
92d5e92
1
Parent(s):
59eb24d
init
Browse files- .ipynb_checkpoints/app-checkpoint.py +5 -2
- app.py +5 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -18,11 +18,14 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
18 |
if ready=='yes':
|
19 |
|
20 |
data_dir = Path(str(user_name)+'/train')
|
21 |
-
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
test_dir = Path(str(user_name)+'/test')
|
25 |
-
test_ds = ImageFolder(test_dir)
|
26 |
|
27 |
label2id = {}
|
28 |
id2label = {}
|
|
|
18 |
if ready=='yes':
|
19 |
|
20 |
data_dir = Path(str(user_name)+'/train')
|
21 |
+
transform = transforms.Compose([
|
22 |
+
transforms.ToTensor(),
|
23 |
+
])
|
24 |
+
train_ds = ImageFolder(data_dir, transform=transform)
|
25 |
|
26 |
|
27 |
test_dir = Path(str(user_name)+'/test')
|
28 |
+
test_ds = ImageFolder(test_dir, transform=transform)
|
29 |
|
30 |
label2id = {}
|
31 |
id2label = {}
|
app.py
CHANGED
@@ -18,11 +18,14 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
18 |
if ready=='yes':
|
19 |
|
20 |
data_dir = Path(str(user_name)+'/train')
|
21 |
-
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
test_dir = Path(str(user_name)+'/test')
|
25 |
-
test_ds = ImageFolder(test_dir)
|
26 |
|
27 |
label2id = {}
|
28 |
id2label = {}
|
|
|
18 |
if ready=='yes':
|
19 |
|
20 |
data_dir = Path(str(user_name)+'/train')
|
21 |
+
transform = transforms.Compose([
|
22 |
+
transforms.ToTensor(),
|
23 |
+
])
|
24 |
+
train_ds = ImageFolder(data_dir, transform=transform)
|
25 |
|
26 |
|
27 |
test_dir = Path(str(user_name)+'/test')
|
28 |
+
test_ds = ImageFolder(test_dir, transform=transform)
|
29 |
|
30 |
label2id = {}
|
31 |
id2label = {}
|