ffreemt commited on
Commit
360dacc
1 Parent(s): 9dbbc8e

Update strop_string

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -66,9 +66,9 @@ information.
66
  User: {prompt}
67
  Assistant: """
68
 
69
- prompt_prefix = [elm.split(":")[0] + ":" for elm in prompt_template.splitlines()]
70
 
71
- logger.debug(f"{prompt_prefix=}")
72
 
73
  model_loc, file_size = dl_hf_model(url)
74
 
@@ -114,7 +114,7 @@ class GenerationConfig:
114
  reset: bool = False
115
  stream: bool = True
116
  threads: int = cpu_count
117
- stop: list[str] = field(default_factory=lambda: prompt_prefix[1:2])
118
 
119
 
120
  def generate(
 
66
  User: {prompt}
67
  Assistant: """
68
 
69
+ stop_string = [elm.split(":")[0] + ":" for elm in prompt_template.splitlines()][-2]
70
 
71
+ logger.debug(f"{stop_string=}")
72
 
73
  model_loc, file_size = dl_hf_model(url)
74
 
 
114
  reset: bool = False
115
  stream: bool = True
116
  threads: int = cpu_count
117
+ stop: list[str] = field(default_factory=lambda: [stop_string])
118
 
119
 
120
  def generate(