Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -699,6 +699,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
699 |
stage_number = await unified_chain.arun_stage_analyzer_chain(conversation_history=pre_chat_history, stage_history= stage_history.replace('stage history: ', ''), last_user_saying=user_response+' <END_OF_TURN>\n')
|
700 |
stage_number = stage_number[-1]
|
701 |
stage_history += stage_number if stage_history == "stage history: " else ", " + stage_number
|
|
|
702 |
|
703 |
return stage_number, stage_history
|
704 |
|
@@ -718,6 +719,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
718 |
yield chat_history_list, chat_history + f"이우선: {sender[0]}<END_OF_TURN>\n"
|
719 |
|
720 |
chat_history_list[-1][1] = sender[0]
|
|
|
721 |
yield chat_history_list, chat_history + f"이우선: {sender[0]}<END_OF_TURN>\n"
|
722 |
|
723 |
async def bot_response_pred(chat_history):
|
@@ -726,6 +728,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
726 |
out = await unified_chain.arun_user_response_chain(conversation_history=pre_chat_history)
|
727 |
for user_response_example in out.split('|'):
|
728 |
response_examples.append([user_response_example])
|
|
|
729 |
return [response_examples, out, ""]
|
730 |
|
731 |
# btn.click(lambda *args: hf_writer.flag(args), [msg, chat_hist, stage_hist, response_examples_text], None, preprocess=False)
|
|
|
699 |
stage_number = await unified_chain.arun_stage_analyzer_chain(conversation_history=pre_chat_history, stage_history= stage_history.replace('stage history: ', ''), last_user_saying=user_response+' <END_OF_TURN>\n')
|
700 |
stage_number = stage_number[-1]
|
701 |
stage_history += stage_number if stage_history == "stage history: " else ", " + stage_number
|
702 |
+
print(stage_history)
|
703 |
|
704 |
return stage_number, stage_history
|
705 |
|
|
|
719 |
yield chat_history_list, chat_history + f"이우선: {sender[0]}<END_OF_TURN>\n"
|
720 |
|
721 |
chat_history_list[-1][1] = sender[0]
|
722 |
+
print(chat_history + f"이우선: {sender[0]}<END_OF_TURN>\n")
|
723 |
yield chat_history_list, chat_history + f"이우선: {sender[0]}<END_OF_TURN>\n"
|
724 |
|
725 |
async def bot_response_pred(chat_history):
|
|
|
728 |
out = await unified_chain.arun_user_response_chain(conversation_history=pre_chat_history)
|
729 |
for user_response_example in out.split('|'):
|
730 |
response_examples.append([user_response_example])
|
731 |
+
print(response_examples)
|
732 |
return [response_examples, out, ""]
|
733 |
|
734 |
# btn.click(lambda *args: hf_writer.flag(args), [msg, chat_hist, stage_hist, response_examples_text], None, preprocess=False)
|