lmzjms commited on
Commit
c53fc43
1 Parent(s): be4ac03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -140,8 +140,8 @@ class ConversationBot:
140
  width, height = img.size
141
  ratio = min(512 / width, 512 / height)
142
  width_new, height_new = (round(width * ratio), round(height * ratio))
143
- width_new = int(np.round(width_new / 64.0)) * 64
144
- height_new = int(np.round(height_new / 64.0)) * 64
145
  img = img.resize((width_new, height_new))
146
  img = img.convert('RGB')
147
  img.save(image_filename, "PNG")
@@ -190,8 +190,7 @@ class ConversationBot:
190
 
191
 
192
  if __name__ == '__main__':
193
- bot = ConversationBot({'TTS_OOD': 'cuda:0',
194
- 'ImageCaptioning': 'cuda:0',
195
  'T2A': 'cuda:0',
196
  'I2A': 'cuda:0',
197
  'TTS': 'cpu',
 
140
  width, height = img.size
141
  ratio = min(512 / width, 512 / height)
142
  width_new, height_new = (round(width * ratio), round(height * ratio))
143
+ width_new = int(np.round(width_new / 64.0)) * 32
144
+ height_new = int(np.round(height_new / 64.0)) * 32
145
  img = img.resize((width_new, height_new))
146
  img = img.convert('RGB')
147
  img.save(image_filename, "PNG")
 
190
 
191
 
192
  if __name__ == '__main__':
193
+ bot = ConversationBot({'ImageCaptioning': 'cuda:0',
 
194
  'T2A': 'cuda:0',
195
  'I2A': 'cuda:0',
196
  'TTS': 'cpu',