Update app.py
Browse files
app.py
CHANGED
|
@@ -68,30 +68,29 @@ def run(domain_source, action_source, hair_source, top_source, bottom_source, do
|
|
| 68 |
|
| 69 |
# == Source Avatar ==
|
| 70 |
# body
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
body = '0'
|
| 74 |
|
| 75 |
# hair
|
| 76 |
-
if
|
| 77 |
-
elif
|
| 78 |
-
elif
|
| 79 |
-
elif
|
| 80 |
-
elif
|
| 81 |
|
| 82 |
# top
|
| 83 |
-
if
|
| 84 |
-
elif
|
| 85 |
-
elif
|
| 86 |
|
| 87 |
# bottom
|
| 88 |
-
if
|
| 89 |
-
elif
|
| 90 |
-
elif
|
| 91 |
-
elif
|
| 92 |
|
| 93 |
-
file_name_source = './Sprite/frames/domain_1/' +
|
| 94 |
-
file_name_source = file_name_source + 'front' + '_' + str(
|
| 95 |
|
| 96 |
gif = display_gif_pad(file_name_source, 'avatar_source.gif')
|
| 97 |
|
|
@@ -112,12 +111,12 @@ def run(domain_source, action_source, hair_source, top_source, bottom_source, do
|
|
| 112 |
gr.Interface(
|
| 113 |
run,
|
| 114 |
inputs=[
|
| 115 |
-
gr.Textbox(value="Source Avatar
|
| 116 |
gr.Radio(choices=["slash", "spellcard", "walk"], value="slash"),
|
| 117 |
gr.Radio(choices=["green", "yellow", "rose", "red", "wine"], value="green"),
|
| 118 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|
| 119 |
gr.Radio(choices=["white", "golden", "red", "silver"], value="white"),
|
| 120 |
-
gr.Textbox(value="Target Avatar
|
| 121 |
gr.Radio(choices=["slash", "spellcard", "walk"], value="walk"),
|
| 122 |
gr.Radio(choices=["green", "yellow", "rose", "red", "wine"], value="green"),
|
| 123 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|
|
|
|
| 68 |
|
| 69 |
# == Source Avatar ==
|
| 70 |
# body
|
| 71 |
+
body_source = '0'
|
| 72 |
+
body_target = '1'
|
|
|
|
| 73 |
|
| 74 |
# hair
|
| 75 |
+
if hair_source == "green": hair_source = '0'
|
| 76 |
+
elif hair_source == "yellow": hair_source = '2'
|
| 77 |
+
elif hair_source == "rose": hair_source = '4'
|
| 78 |
+
elif hair_source == "red": hair_source = '7'
|
| 79 |
+
elif hair_source == "wine": hair_source = '8'
|
| 80 |
|
| 81 |
# top
|
| 82 |
+
if top_source == "brown": top_source = '0'
|
| 83 |
+
elif top_source == "blue": top_source = '1'
|
| 84 |
+
elif top_source == "white": top_source = '2'
|
| 85 |
|
| 86 |
# bottom
|
| 87 |
+
if bottom_source == "white": bottom_source = '0'
|
| 88 |
+
elif bottom_source == "golden": bottom_source = '1'
|
| 89 |
+
elif bottom_source == "red": bottom_source = '2'
|
| 90 |
+
elif bottom_source == "silver": bottom_source = '3'
|
| 91 |
|
| 92 |
+
file_name_source = './Sprite/frames/domain_1/' + action_source + '/'
|
| 93 |
+
file_name_source = file_name_source + 'front' + '_' + str(body_source) + str(bottom_source) + str(top_source) + str(hair_source) + '_'
|
| 94 |
|
| 95 |
gif = display_gif_pad(file_name_source, 'avatar_source.gif')
|
| 96 |
|
|
|
|
| 111 |
gr.Interface(
|
| 112 |
run,
|
| 113 |
inputs=[
|
| 114 |
+
gr.Textbox(value="Source Avatar - Human", interactive=False),
|
| 115 |
gr.Radio(choices=["slash", "spellcard", "walk"], value="slash"),
|
| 116 |
gr.Radio(choices=["green", "yellow", "rose", "red", "wine"], value="green"),
|
| 117 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|
| 118 |
gr.Radio(choices=["white", "golden", "red", "silver"], value="white"),
|
| 119 |
+
gr.Textbox(value="Target Avatar - Alien", interactive=False),
|
| 120 |
gr.Radio(choices=["slash", "spellcard", "walk"], value="walk"),
|
| 121 |
gr.Radio(choices=["green", "yellow", "rose", "red", "wine"], value="green"),
|
| 122 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|