Spaces:
Runtime error
Runtime error
Update app.py
Browse fileslonger length for zh
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def inference(raw_image, model_n, strategy):
|
|
| 21 |
config = GenerationConfig(
|
| 22 |
do_sample=False,
|
| 23 |
num_beams=3,
|
| 24 |
-
max_length=
|
| 25 |
min_length=5,
|
| 26 |
)
|
| 27 |
captions = model.generate(**input, generation_config=config)
|
|
@@ -29,7 +29,7 @@ def inference(raw_image, model_n, strategy):
|
|
| 29 |
config = GenerationConfig(
|
| 30 |
do_sample=True,
|
| 31 |
top_p=0.9,
|
| 32 |
-
max_length=
|
| 33 |
min_length=5,
|
| 34 |
)
|
| 35 |
captions = model.generate(**input, generation_config=config)
|
|
|
|
| 21 |
config = GenerationConfig(
|
| 22 |
do_sample=False,
|
| 23 |
num_beams=3,
|
| 24 |
+
max_length=50,
|
| 25 |
min_length=5,
|
| 26 |
)
|
| 27 |
captions = model.generate(**input, generation_config=config)
|
|
|
|
| 29 |
config = GenerationConfig(
|
| 30 |
do_sample=True,
|
| 31 |
top_p=0.9,
|
| 32 |
+
max_length=50,
|
| 33 |
min_length=5,
|
| 34 |
)
|
| 35 |
captions = model.generate(**input, generation_config=config)
|