Luigi commited on
Commit
636baf9
·
1 Parent(s): 7b7ed26

slightly increase repeat_penalty to reduce token repetition

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -103,6 +103,7 @@ def caption_frame(frame):
103
  messages=messages,
104
  max_tokens=128,
105
  temperature=0.1,
 
106
  stop=["<end_of_utterance>"],
107
  )
108
  out = (resp["choices"][0].get("message", {}).get("content") or "").strip()
 
103
  messages=messages,
104
  max_tokens=128,
105
  temperature=0.1,
106
+ repeat_penalty=1.1, # discourage exact token repeats
107
  stop=["<end_of_utterance>"],
108
  )
109
  out = (resp["choices"][0].get("message", {}).get("content") or "").strip()