rynmurdock commited on
Commit
d8085f1
1 Parent(s): 6c62bb5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -114,12 +114,13 @@ def next_image(embs, ys):
114
 
115
 
116
  def start(_, embs, ys):
117
- embs, ys = next_image(embs, ys)
118
  return [
119
  gr.Button(value='Like', interactive=True),
120
  gr.Button(value='Neither', interactive=True),
121
  gr.Button(value='Dislike', interactive=True),
122
  gr.Button(value='Start', interactive=False),
 
123
  embs,
124
  ys,
125
  ]
@@ -130,11 +131,11 @@ def choose(choice, embs, ys):
130
  choice = 1
131
  elif choice == 'Neither':
132
  _ = embs.pop(-1)
133
- embs, ys = next_image(embs, ys)
134
  else:
135
  choice = 0
136
  ys.append(choice)
137
- embs, ys = next_image(embs, ys)
138
  return {'img': image, 'embs': embs, 'ys': ys}
139
 
140
  css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"
 
114
 
115
 
116
  def start(_, embs, ys):
117
+ image, embs, ys = next_image(embs, ys)
118
  return [
119
  gr.Button(value='Like', interactive=True),
120
  gr.Button(value='Neither', interactive=True),
121
  gr.Button(value='Dislike', interactive=True),
122
  gr.Button(value='Start', interactive=False),
123
+ image
124
  embs,
125
  ys,
126
  ]
 
131
  choice = 1
132
  elif choice == 'Neither':
133
  _ = embs.pop(-1)
134
+ img, embs, ys = next_image(embs, ys)
135
  else:
136
  choice = 0
137
  ys.append(choice)
138
+ img, embs, ys = next_image(embs, ys)
139
  return {'img': image, 'embs': embs, 'ys': ys}
140
 
141
  css = "div#output-image {height: 768px !important; width: 768px !important; margin:auto;}"