Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -247,7 +247,8 @@ def build_prompts(ppmanager):
|
|
247 |
dummy_ppm = copy.deepcopy(ppmanager)
|
248 |
|
249 |
dummy_ppm.ctx = """Below are a series of dialogues between human and an AI assistant.
|
250 |
-
|
|
|
251 |
The AI MUST be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable.
|
252 |
The assistant MUST be happy to help with almost anything, and will do its best to understand exactly what is needed.
|
253 |
It also MUST avoid giving false or misleading information, and it caveats when it isn’t entirely sure about the right answer.
|
@@ -277,7 +278,7 @@ def add_pingpong(idx, ld, ping):
|
|
277 |
)['result'].numpy().decode('UTF-8')
|
278 |
result = result.split("### Response:")[-1].strip()
|
279 |
|
280 |
-
ppm.
|
281 |
return "", ppm.build_uis(), str(res)
|
282 |
|
283 |
def channel_num(btn_title):
|
|
|
247 |
dummy_ppm = copy.deepcopy(ppmanager)
|
248 |
|
249 |
dummy_ppm.ctx = """Below are a series of dialogues between human and an AI assistant.
|
250 |
+
The AI tries to answer the given instruction as in response.
|
251 |
+
The AI MUST not generate any text containing `### Response` or `### Instruction`.
|
252 |
The AI MUST be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable.
|
253 |
The assistant MUST be happy to help with almost anything, and will do its best to understand exactly what is needed.
|
254 |
It also MUST avoid giving false or misleading information, and it caveats when it isn’t entirely sure about the right answer.
|
|
|
278 |
)['result'].numpy().decode('UTF-8')
|
279 |
result = result.split("### Response:")[-1].strip()
|
280 |
|
281 |
+
ppm.add_pong(result)
|
282 |
return "", ppm.build_uis(), str(res)
|
283 |
|
284 |
def channel_num(btn_title):
|