Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,8 @@ with gr.Blocks() as demo:
|
|
29 |
def bot(history):
|
30 |
print("history: ",history)
|
31 |
prompt = f"Jesteś AI assystentem. Odpowiadaj po polsku. <user>: {history[0]}. <assistant>:"
|
32 |
-
print(prompt)
|
33 |
stream = llm(prompt, **params)
|
34 |
-
#stream = llm(prompt = f"<s>[INST]<<SYS>> Jesteś AI assystentem. Odpowiadaj po polsku. {history}. ", **params)
|
35 |
history[-1][1] = ""
|
36 |
answer_save = ""
|
37 |
for character in stream:
|
@@ -40,7 +39,7 @@ with gr.Blocks() as demo:
|
|
40 |
time.sleep(0.005)
|
41 |
yield history
|
42 |
|
43 |
-
print(answer_save)
|
44 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
45 |
bot, chatbot, chatbot
|
46 |
)
|
|
|
29 |
def bot(history):
|
30 |
print("history: ",history)
|
31 |
prompt = f"Jesteś AI assystentem. Odpowiadaj po polsku. <user>: {history[0]}. <assistant>:"
|
32 |
+
print("prompt",prompt)
|
33 |
stream = llm(prompt, **params)
|
|
|
34 |
history[-1][1] = ""
|
35 |
answer_save = ""
|
36 |
for character in stream:
|
|
|
39 |
time.sleep(0.005)
|
40 |
yield history
|
41 |
|
42 |
+
print("answer_save:",answer_save)
|
43 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
44 |
bot, chatbot, chatbot
|
45 |
)
|