Update app.py
Browse files
app.py
CHANGED
@@ -29,17 +29,9 @@ class Generator(nn.Module):
|
|
29 |
return output
|
30 |
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
def predict(seed, num_punks):
|
38 |
-
torch.manual_seed(seed)
|
39 |
-
z = torch.randn(num_punks, 100, 1, 1)
|
40 |
-
punks = model(z)
|
41 |
-
save_image(punks, "punks.png", normalize=True)
|
42 |
-
return 'punks.png'
|
43 |
|
44 |
gr.Interface(
|
45 |
predict,
|
@@ -49,7 +41,6 @@ gr.Interface(
|
|
49 |
gr.Slider(0, 3, label='Top', step=1, default=0),
|
50 |
gr.Slider(0, 4, label='Bottom', step=1, default=0),
|
51 |
],
|
52 |
-
outputs="
|
53 |
-
examples=[[123, 15], [42, 29], [456, 8], [1337, 35]],
|
54 |
live=True,
|
55 |
).launch(cache_examples=True)
|
|
|
29 |
return output
|
30 |
|
31 |
|
32 |
+
def predict(body, hair, top, bottom):
|
33 |
+
name = str(body) + str(hair) + str(top) + str(bottom)
|
34 |
+
return name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
gr.Interface(
|
37 |
predict,
|
|
|
41 |
gr.Slider(0, 3, label='Top', step=1, default=0),
|
42 |
gr.Slider(0, 4, label='Bottom', step=1, default=0),
|
43 |
],
|
44 |
+
outputs="name",
|
|
|
45 |
live=True,
|
46 |
).launch(cache_examples=True)
|