airzy1 commited on
Commit
57fd3e6
·
verified ·
1 Parent(s): 5be1a48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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=1024,
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]