Update app.py
Browse files
app.py
CHANGED
@@ -31,14 +31,21 @@ def predict(body, hair, top, bottom):
|
|
31 |
name = str(body) + str(hair) + str(top) + str(bottom)
|
32 |
return name
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
gr.Interface(
|
35 |
predict,
|
36 |
-
inputs=[
|
37 |
-
gr.Radio(["human", "alien"]),
|
38 |
-
gr.Slider(0, 5, label='Hair', step=1, default=0),
|
39 |
-
gr.Slider(0, 3, label='Top', step=1, default=0),
|
40 |
-
gr.Slider(0, 4, label='Bottom', step=1, default=0),
|
41 |
-
],
|
42 |
outputs="image",
|
43 |
live=True,
|
44 |
).launch()
|
|
|
31 |
name = str(body) + str(hair) + str(top) + str(bottom)
|
32 |
return name
|
33 |
|
34 |
+
|
35 |
+
source = [gr.Radio(["human", "alien"]),
|
36 |
+
gr.Slider(0, 5, label='Hair', step=1, default=0),
|
37 |
+
gr.Slider(0, 3, label='Top', step=1, default=0),
|
38 |
+
gr.Slider(0, 4, label='Bottom', step=1, default=0)],
|
39 |
+
|
40 |
+
target = [gr.Radio(["human", "alien"]),
|
41 |
+
gr.Slider(0, 5, label='Hair', step=1, default=0),
|
42 |
+
gr.Slider(0, 3, label='Top', step=1, default=0),
|
43 |
+
gr.Slider(0, 4, label='Bottom', step=1, default=0)],
|
44 |
+
|
45 |
+
|
46 |
gr.Interface(
|
47 |
predict,
|
48 |
+
inputs=[source, target],
|
|
|
|
|
|
|
|
|
|
|
49 |
outputs="image",
|
50 |
live=True,
|
51 |
).launch()
|