Spaces:
Runtime error
Runtime error
gorkemgoknar
commited on
Commit
•
5b97989
1
Parent(s):
b20afa0
Update app.py
Browse filesedit response due to llama_cpp_python
app.py
CHANGED
@@ -143,9 +143,10 @@ def build_question(character,question,context=None, answer=None,history=None , u
|
|
143 |
def get_answer_from_response(text,character):
|
144 |
|
145 |
# on HF it has same text plus additional
|
146 |
-
#
|
|
|
147 |
# on cpp it continues
|
148 |
-
response= text
|
149 |
# get only first line of response
|
150 |
response= response.split("###")[0]
|
151 |
response= response.split("#")[0]
|
|
|
143 |
def get_answer_from_response(text,character):
|
144 |
|
145 |
# on HF it has same text plus additional
|
146 |
+
# on llama_cpp same full text
|
147 |
+
response= text.split(f"### {character}:")[1]
|
148 |
# on cpp it continues
|
149 |
+
# response= text
|
150 |
# get only first line of response
|
151 |
response= response.split("###")[0]
|
152 |
response= response.split("#")[0]
|