1inkusFace commited on
Commit
65b63f2
·
verified ·
1 Parent(s): cdf499d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -329,12 +329,12 @@ def captioning(img, prompt_1,prompt_2,prompt_3,prompt_4,prompt_5):
329
  **inputs,
330
  do_sample=True,
331
  num_beams=5,
332
- max_length=256,
333
- min_length=42,
334
  top_p=0.2,
335
  repetition_penalty=1.0,
336
  length_penalty=2.0,
337
- temperature=0.55,
338
  )
339
  generated_text = processor5.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()
340
  response_text = generated_text.replace(prompt, "").strip() #Or could try .split(prompt, 1)[-1].strip()
 
329
  **inputs,
330
  do_sample=True,
331
  num_beams=5,
332
+ max_length=96,
333
+ min_length=32,
334
  top_p=0.2,
335
  repetition_penalty=1.0,
336
  length_penalty=2.0,
337
+ temperature=0.75,
338
  )
339
  generated_text = processor5.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()
340
  response_text = generated_text.replace(prompt, "").strip() #Or could try .split(prompt, 1)[-1].strip()