lvwerra HF staff commited on
Commit
220e795
1 Parent(s): ed3bcbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,9 +80,9 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
80
  if FIM_INDICATOR in prompt:
81
  fim_mode = True
82
  try:
83
- prefix, suffix = prompt.split("<FILL-HERE>")
84
  except:
85
- ValueError("Only one <FILL-HERE> allowed in prompt!")
86
  prompt = f"{FIM_PREFIX}{prefix}{FIM_SUFFIX}{suffix}{FIM_MIDDLE}"
87
 
88
  stream = client.generate_stream(prompt, **generate_kwargs)
 
80
  if FIM_INDICATOR in prompt:
81
  fim_mode = True
82
  try:
83
+ prefix, suffix = prompt.split(FIM_INDICATOR)
84
  except:
85
+ ValueError(f"Only one {FIM_INDICATOR} allowed in prompt!")
86
  prompt = f"{FIM_PREFIX}{prefix}{FIM_SUFFIX}{suffix}{FIM_MIDDLE}"
87
 
88
  stream = client.generate_stream(prompt, **generate_kwargs)