rynmurdock commited on
Commit
74bf4ec
1 Parent(s): 353c6a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,7 +64,7 @@ def next_image():
64
  response = requests.get(output['file1'])
65
  image = Image.open(BytesIO(response.content))
66
 
67
- embs.append(torch.tensor([float(i) for i in urlopen(output['file2']).read().decode('utf-8').split(', ')]))
68
  return image
69
  else:
70
  print('######### Roaming #########')
@@ -105,7 +105,7 @@ def next_image():
105
  image = Image.open(BytesIO(response.content))
106
 
107
 
108
- im_emb = torch.tensor([float(i) for i in urlopen(output['file2']).read().decode('utf-8').split(', ')])
109
  embs.append(im_emb)
110
 
111
  torch.save(lin_class.coef_, f'./{start_time}.pt')
 
64
  response = requests.get(output['file1'])
65
  image = Image.open(BytesIO(response.content))
66
 
67
+ embs.append(torch.tensor([float(i) for i in urlopen(output['file2']).read().decode('utf-8').split(', ')]).unsqueeze(0))
68
  return image
69
  else:
70
  print('######### Roaming #########')
 
105
  image = Image.open(BytesIO(response.content))
106
 
107
 
108
+ im_emb = torch.tensor([float(i) for i in urlopen(output['file2']).read().decode('utf-8').split(', ')]).unsqueeze(0)
109
  embs.append(im_emb)
110
 
111
  torch.save(lin_class.coef_, f'./{start_time}.pt')