Update app.py
Browse files
app.py
CHANGED
|
@@ -135,8 +135,10 @@ def analyze_pantry(image: Image.Image) -> Tuple[Image.Image, Dict[str, Any]]:
|
|
| 135 |
with torch.inference_mode():
|
| 136 |
output_ids = model.generate(
|
| 137 |
**inputs,
|
| 138 |
-
max_new_tokens=
|
| 139 |
do_sample=False,
|
|
|
|
|
|
|
| 140 |
)
|
| 141 |
|
| 142 |
prompt_len = inputs["input_ids"].shape[-1]
|
|
|
|
| 135 |
with torch.inference_mode():
|
| 136 |
output_ids = model.generate(
|
| 137 |
**inputs,
|
| 138 |
+
max_new_tokens=2048,
|
| 139 |
do_sample=False,
|
| 140 |
+
repetition_penalty=1.08,
|
| 141 |
+
no_repeat_ngram_size=4,
|
| 142 |
)
|
| 143 |
|
| 144 |
prompt_len = inputs["input_ids"].shape[-1]
|