Spaces:
Runtime error
Runtime error
update license
Browse files
app.py
CHANGED
@@ -13,6 +13,10 @@
|
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
#
|
|
|
|
|
|
|
|
|
16 |
# MIT License
|
17 |
|
18 |
# Copyright (c) 2022 Lorenzo Breschi
|
@@ -47,7 +51,7 @@ from pathlib import Path
|
|
47 |
from torch.utils.data import Dataset
|
48 |
import datetime
|
49 |
|
50 |
-
|
51 |
device = 'cpu'
|
52 |
dtype = torch.float32
|
53 |
generator = torch.load("models/generator.pt")
|
@@ -67,7 +71,6 @@ class ImageDataset(Dataset):
|
|
67 |
return len(self.imgs)
|
68 |
|
69 |
|
70 |
-
# below part is adapted from https://github.com/rnwzd/FSPBT-Image-Translation/blob/master/train.py
|
71 |
data_path = Path('data/webcam')
|
72 |
train_image_dd = prepare_data(data_path)
|
73 |
dm = PatchDataModule(train_image_dd, patch_size=2**6,
|
|
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
#
|
16 |
+
# Part of the code in this file is adapted from
|
17 |
+
# https://github.com/rnwzd/FSPBT-Image-Translation/blob/master/eval.py and
|
18 |
+
# https://github.com/rnwzd/FSPBT-Image-Translation/blob/master/train.py
|
19 |
+
|
20 |
# MIT License
|
21 |
|
22 |
# Copyright (c) 2022 Lorenzo Breschi
|
|
|
51 |
from torch.utils.data import Dataset
|
52 |
import datetime
|
53 |
|
54 |
+
|
55 |
device = 'cpu'
|
56 |
dtype = torch.float32
|
57 |
generator = torch.load("models/generator.pt")
|
|
|
71 |
return len(self.imgs)
|
72 |
|
73 |
|
|
|
74 |
data_path = Path('data/webcam')
|
75 |
train_image_dd = prepare_data(data_path)
|
76 |
dm = PatchDataModule(train_image_dd, patch_size=2**6,
|