rynmurdock commited on
Commit
211e953
β€’
1 Parent(s): a436eb7

longer calibration

Browse files
second.png β†’ 10o.png RENAMED
File without changes
first.png β†’ 1o.png RENAMED
File without changes
fifth.png β†’ 2o.png RENAMED
File without changes
sixth.png β†’ 3o.png RENAMED
File without changes
third.png β†’ 4o.png RENAMED
File without changes
fourth.png β†’ 5o.png RENAMED
File without changes
6o.png ADDED

Git LFS Details

  • SHA256: 6cf8b9917283b2c5b2d74d5042d0219f7d458e85d1e0c8189aae99f16e304adb
  • Pointer size: 132 Bytes
  • Size of remote file: 1.53 MB
7o.png ADDED

Git LFS Details

  • SHA256: a2919c8daed335927f5b6cf9b46016bf1717952b9a475db3eee8a1cd36b89d56
  • Pointer size: 132 Bytes
  • Size of remote file: 1.98 MB
8o.png ADDED

Git LFS Details

  • SHA256: ce5a40a8ef28cf70a49b5dc5318f382a738f58d1a838fedae25ee2206e7e174a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.44 MB
9o.png ADDED

Git LFS Details

  • SHA256: d0557ac42ac530a2a562609cde5ecbbeefb49eab392c69ddb7e80187495ba14b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.4 MB
app.py CHANGED
@@ -194,7 +194,7 @@ def get_user_emb(embs, ys):
194
  print('Dropping at 20')
195
 
196
  if mini < 1:
197
- feature_embs = torch.stack([torch.randn(1280), torch.randn(1280)])
198
  ys_t = [0, 1]
199
  print('Not enough ratings.')
200
  else:
@@ -386,8 +386,9 @@ def choose(img, choice, calibrate_prompts, user_id, request: gr.Request):
386
  # if it's still in the dataframe, add the choice
387
  if len(prevs_df.loc[row_mask, 'user:rating']) > 0:
388
  prevs_df.loc[row_mask, 'user:rating'][0][user_id] = choice
 
389
  prevs_df.loc[row_mask, 'latest_user_to_rate'] = [user_id]
390
- img, calibrate_prompts, = next_image(calibrate_prompts, user_id)
391
  return img, calibrate_prompts
392
 
393
  css = '''.gradio-container{max-width: 700px !important}
@@ -451,11 +452,16 @@ Explore the latent space without text prompts based on your preferences. Learn m
451
  user_id = gr.State()
452
  # calibration videos -- this is a misnomer now :D
453
  calibrate_prompts = gr.State([
454
- './first.png',
455
- './second.png',
456
- './sixth.png',
457
- './fifth.png',
458
- './fourth.png',
 
 
 
 
 
459
  ])
460
  def l():
461
  return None
@@ -543,12 +549,17 @@ def encode_space(x):
543
  return im_emb.detach().to('cpu').to(torch.float32)
544
 
545
  # prep our calibration videos
546
- for im, txt in [ # TODO more movement
547
- ('./first.png', 'describe the scene: a sketch'),
548
- ('./second.png', 'describe the scene: omens in the suburbs'),
549
- ('./sixth.png', 'describe the scene: geometric abstract art of a windmill'),
550
- ('./fifth.png', 'describe the scene: memento mori'),
551
- ('./fourth.png', 'describe the scene: a green plate with anespresso'),
 
 
 
 
 
552
  ]:
553
  tmp_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'text', 'gemb'])
554
  tmp_df['paths'] = [im]
 
194
  print('Dropping at 20')
195
 
196
  if mini < 1:
197
+ feature_embs = torch.stack([torch.randn(1024), torch.randn(1024)])
198
  ys_t = [0, 1]
199
  print('Not enough ratings.')
200
  else:
 
386
  # if it's still in the dataframe, add the choice
387
  if len(prevs_df.loc[row_mask, 'user:rating']) > 0:
388
  prevs_df.loc[row_mask, 'user:rating'][0][user_id] = choice
389
+ print(row_mask, prevs_df.loc[row_mask, 'latest_user_to_rate'], [user_id])
390
  prevs_df.loc[row_mask, 'latest_user_to_rate'] = [user_id]
391
+ img, calibrate_prompts = next_image(calibrate_prompts, user_id)
392
  return img, calibrate_prompts
393
 
394
  css = '''.gradio-container{max-width: 700px !important}
 
452
  user_id = gr.State()
453
  # calibration videos -- this is a misnomer now :D
454
  calibrate_prompts = gr.State([
455
+ './5o.png',
456
+ './2o.png',
457
+ './6o.png',
458
+ './7o.png',
459
+ './1o.png',
460
+ './8o.png',
461
+ './3o.png',
462
+ './4o.png',
463
+ './10o.png',
464
+ './9o.png',
465
  ])
466
  def l():
467
  return None
 
549
  return im_emb.detach().to('cpu').to(torch.float32)
550
 
551
  # prep our calibration videos
552
+ for im, txt in [ # DO NOT NAME THESE PNGs JUST NUMBERS! apparently we assign images by number
553
+ ('./1o.png', 'describe the scene: omens in the suburbs'),
554
+ ('./2o.png', 'describe the scene: geometric abstract art of a windmill'),
555
+ ('./3o.png', 'describe the scene: memento mori'),
556
+ ('./4o.png', 'describe the scene: a green plate with anespresso'),
557
+ ('./5o.png', '5 '),
558
+ ('./6o.png', '6 '),
559
+ ('./7o.png', '7 '),
560
+ ('./8o.png', '8 '),
561
+ ('./9o.png', '9 '),
562
+ ('./10o.png', '10 '),
563
  ]:
564
  tmp_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'text', 'gemb'])
565
  tmp_df['paths'] = [im]