dcd018 commited on
Commit
ca9259b
·
1 Parent(s): d7218c4

Inference.

Browse files
Files changed (1) hide show
  1. app/api/api_v1/endpoints/openai.py +3 -3
app/api/api_v1/endpoints/openai.py CHANGED
@@ -176,10 +176,10 @@ async def create_collection(
176
  pages = convert_from_bytes(results.content, 500, None, 1, 1)
177
  cover = pages[0]
178
  width, height = cover.size
179
- target_width = round(width - (width * 0.75))
180
- target_height = round(height - (height * 0.75))
181
  cover = cover.resize((target_width, target_height), PIL.Image.Resampling.LANCZOS)
182
- cover.save(tmp_file, optimize=True, quality=95)
183
  tasks = label_studio_project.import_tasks(tmp_file)
184
  os.remove(tmp_file)
185
 
 
176
  pages = convert_from_bytes(results.content, 500, None, 1, 1)
177
  cover = pages[0]
178
  width, height = cover.size
179
+ target_width = round(width - (width * 0.8))
180
+ target_height = round(height - (height * 0.8))
181
  cover = cover.resize((target_width, target_height), PIL.Image.Resampling.LANCZOS)
182
+ cover.save(tmp_file, optimize=True, quality=75)
183
  tasks = label_studio_project.import_tasks(tmp_file)
184
  os.remove(tmp_file)
185