Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
·
360dacc
1
Parent(s):
9dbbc8e
Update strop_string
Browse files
app.py
CHANGED
@@ -66,9 +66,9 @@ information.
|
|
66 |
User: {prompt}
|
67 |
Assistant: """
|
68 |
|
69 |
-
|
70 |
|
71 |
-
logger.debug(f"{
|
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:
|
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(
|