Spaces:
Runtime error
Runtime error
fix: use the original delimiters when saving data
Browse files
app.py
CHANGED
@@ -1068,7 +1068,7 @@ def vote(data: gr.LikeData):
|
|
1068 |
"model_version":MODEL_VERSION,
|
1069 |
"name":NAME,
|
1070 |
"username":USERNAME,
|
1071 |
-
"prompt": PROMPT,
|
1072 |
"history": "", #HISTORY,
|
1073 |
"system prompt": additional_inputs[0].value,
|
1074 |
"temperature": additional_inputs[1].value,
|
@@ -1076,7 +1076,7 @@ def vote(data: gr.LikeData):
|
|
1076 |
"top_p": additional_inputs[3].value,
|
1077 |
"top_k": additional_inputs[4].value,
|
1078 |
"repetition_penalty": additional_inputs[5].value,
|
1079 |
-
"response": data.value,
|
1080 |
"label": data.liked,
|
1081 |
}, ensure_ascii=False
|
1082 |
)
|
|
|
1068 |
"model_version":MODEL_VERSION,
|
1069 |
"name":NAME,
|
1070 |
"username":USERNAME,
|
1071 |
+
"prompt": PROMPT.replace('\n','؛').replace('\t','/').replace(' * ','/').strip(),
|
1072 |
"history": "", #HISTORY,
|
1073 |
"system prompt": additional_inputs[0].value,
|
1074 |
"temperature": additional_inputs[1].value,
|
|
|
1076 |
"top_p": additional_inputs[3].value,
|
1077 |
"top_k": additional_inputs[4].value,
|
1078 |
"repetition_penalty": additional_inputs[5].value,
|
1079 |
+
"response": data.value.replace('\n','؛').replace('\t','/').replace(' * ','/').strip(),
|
1080 |
"label": data.liked,
|
1081 |
}, ensure_ascii=False
|
1082 |
)
|