1inkusFace commited on
Commit
2a603bc
·
verified ·
1 Parent(s): 4be7938

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -327,13 +327,13 @@ def captioning(img, prompt_1,prompt_2,prompt_3,prompt_4,prompt_5):
327
  generated_ids = model5.generate(
328
  **inputs,
329
  do_sample=True,
330
- num_beams=1,
331
  max_length=64,
332
  #min_length=16,
333
  top_p=0.1,
334
  repetition_penalty=1.0,
335
  length_penalty=2.0,
336
- temperature=0.5,
337
  )
338
  generated_text = processor5.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()
339
  response_text = generated_text.replace(prompt, "").strip() #Or could try .split(prompt, 1)[-1].strip()
 
327
  generated_ids = model5.generate(
328
  **inputs,
329
  do_sample=True,
330
+ num_beams=5,
331
  max_length=64,
332
  #min_length=16,
333
  top_p=0.1,
334
  repetition_penalty=1.0,
335
  length_penalty=2.0,
336
+ temperature=0.55,
337
  )
338
  generated_text = processor5.batch_decode(generated_ids, skip_special_tokens=True)[0].strip()
339
  response_text = generated_text.replace(prompt, "").strip() #Or could try .split(prompt, 1)[-1].strip()