Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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=
|
333 |
-
min_length=
|
334 |
top_p=0.2,
|
335 |
repetition_penalty=1.0,
|
336 |
length_penalty=2.0,
|
337 |
-
temperature=0.
|
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()
|