Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ gender_map = {'Male': 0, 'Female': 1}
|
|
29 |
|
30 |
def generate_faces(age, ethnicity, gender):
|
31 |
|
32 |
-
random_z = torch.randn(num_faces_to_generate, z_dim)
|
33 |
|
34 |
|
35 |
random_z[:, 0] = age
|
@@ -37,7 +37,7 @@ def generate_faces(age, ethnicity, gender):
|
|
37 |
random_z[:, 2] = gender_map[gender]
|
38 |
|
39 |
|
40 |
-
random_z[:, 3:] = torch.randn(num_faces_to_generate, z_dim - 3)
|
41 |
with torch.no_grad():
|
42 |
generated_faces = generator(random_z)
|
43 |
|
|
|
29 |
|
30 |
def generate_faces(age, ethnicity, gender):
|
31 |
|
32 |
+
random_z = torch.randn(num_faces_to_generate, z_dim)
|
33 |
|
34 |
|
35 |
random_z[:, 0] = age
|
|
|
37 |
random_z[:, 2] = gender_map[gender]
|
38 |
|
39 |
|
40 |
+
random_z[:, 3:] = torch.randn(num_faces_to_generate, z_dim - 3)
|
41 |
with torch.no_grad():
|
42 |
generated_faces = generator(random_z)
|
43 |
|