Spaces:
Runtime error
Runtime error
Bryan Wade
commited on
Commit
·
738ddc1
1
Parent(s):
ae10612
default values
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ def predict(dropdown, style_dropdown, manual_gpt_replacement, manual_sd_prompt,
|
|
| 74 |
if manual_sd_prompt != '':
|
| 75 |
sd_input = manual_sd_prompt
|
| 76 |
else:
|
| 77 |
-
sd_input = "dnditem, " + dropdown + style_hashmap[style_dropdown] + ", circle inner background and white outerbackground"
|
| 78 |
|
| 79 |
|
| 80 |
response = openai.Completion.create(
|
|
@@ -111,8 +111,8 @@ manual_sd_prompt = gr.Textbox(placeholder="Input any query here, to replace the
|
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
-
choiceArr = ["
|
| 115 |
-
dropdown = gr.Dropdown(label= "Item Type", choices=choiceArr)
|
| 116 |
|
| 117 |
|
| 118 |
|
|
@@ -121,7 +121,7 @@ lines = text_file.read().split('\n')
|
|
| 121 |
dropdown_arr, style_hashmap = convert_lines(lines)
|
| 122 |
|
| 123 |
|
| 124 |
-
style_dropdown = gr.Dropdown(label= "Item Ability and Style", choices=dropdown_arr)
|
| 125 |
|
| 126 |
output_img = gr.Gallery(label="Generated image")
|
| 127 |
output_img.style(grid=2)
|
|
|
|
| 74 |
if manual_sd_prompt != '':
|
| 75 |
sd_input = manual_sd_prompt
|
| 76 |
else:
|
| 77 |
+
sd_input = "dnditem, " + dropdown + ", " + style_hashmap[style_dropdown] + ", circle inner background and white outerbackground"
|
| 78 |
|
| 79 |
|
| 80 |
response = openai.Completion.create(
|
|
|
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
+
choiceArr = ["a pair of boots", "a cloak", "a pair of gloves", "a helmet", "a necklace", "a ring", "a robe", "a rod", "a shield", "a staff", "a sword", "a wand"]
|
| 115 |
+
dropdown = gr.Dropdown(label= "Item Type", choices=choiceArr, value="a pair of boots")
|
| 116 |
|
| 117 |
|
| 118 |
|
|
|
|
| 121 |
dropdown_arr, style_hashmap = convert_lines(lines)
|
| 122 |
|
| 123 |
|
| 124 |
+
style_dropdown = gr.Dropdown(label= "Item Ability and Style", choices=dropdown_arr, value="elvenkind")
|
| 125 |
|
| 126 |
output_img = gr.Gallery(label="Generated image")
|
| 127 |
output_img.style(grid=2)
|