Spaces:
Running
on
A10G
Running
on
A10G
rynmurdock
commited on
Commit
•
5d2597e
1
Parent(s):
7dcdfac
Update app.py
Browse files
app.py
CHANGED
@@ -101,8 +101,8 @@ def next_image(embs, ys, calibrate_prompts):
|
|
101 |
|
102 |
|
103 |
|
104 |
-
def start(_, embs, ys):
|
105 |
-
image, embs, ys, calibrate_prompts = next_image(embs, ys)
|
106 |
return [
|
107 |
gr.Button(value='Like', interactive=True),
|
108 |
gr.Button(value='Neither', interactive=True),
|
@@ -115,16 +115,16 @@ def start(_, embs, ys):
|
|
115 |
]
|
116 |
|
117 |
|
118 |
-
def choose(choice, embs, ys):
|
119 |
if choice == 'Like':
|
120 |
choice = 1
|
121 |
elif choice == 'Neither':
|
122 |
_ = embs.pop(-1)
|
123 |
-
img, embs, ys, calibrate_prompts = next_image(embs, ys)
|
124 |
else:
|
125 |
choice = 0
|
126 |
ys.append(choice)
|
127 |
-
img, embs, ys, calibrate_prompts = next_image(embs, ys)
|
128 |
return img, embs, ys, calibrate_prompts
|
129 |
|
130 |
css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
|
|
|
101 |
|
102 |
|
103 |
|
104 |
+
def start(_, embs, ys, calibrate_prompts):
|
105 |
+
image, embs, ys, calibrate_prompts = next_image(embs, ys, calibrate_prompts)
|
106 |
return [
|
107 |
gr.Button(value='Like', interactive=True),
|
108 |
gr.Button(value='Neither', interactive=True),
|
|
|
115 |
]
|
116 |
|
117 |
|
118 |
+
def choose(choice, embs, ys, calibrate_prompts):
|
119 |
if choice == 'Like':
|
120 |
choice = 1
|
121 |
elif choice == 'Neither':
|
122 |
_ = embs.pop(-1)
|
123 |
+
img, embs, ys, calibrate_prompts = next_image(embs, ys, calibrate_prompts)
|
124 |
else:
|
125 |
choice = 0
|
126 |
ys.append(choice)
|
127 |
+
img, embs, ys, calibrate_prompts = next_image(embs, ys, calibrate_prompts)
|
128 |
return img, embs, ys, calibrate_prompts
|
129 |
|
130 |
css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
|