Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -290,7 +290,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
290 |
pre_conversation_history += f"User: {chat[0]} <END_OF_TURN>\n"
|
291 |
pre_conversation_history += f"이우선: {chat[1]} <END_OF_TURN>\n"
|
292 |
conversation_history = pre_conversation_history + f"User: {user_response} <END_OF_TURN>\n"
|
293 |
-
stage_number = stage_analyzer_chain.run({'conversation_history': conversation_history, 'stage_history': stage_history
|
294 |
stage_number = stage_number[-1]
|
295 |
stage_history += stage_number if stage_history == "stage history: " else ", " + stage_number
|
296 |
response = agent_executor.run({'input':user_response, 'conversation_history': pre_conversation_history, 'stage_number': stage_number})
|
@@ -313,5 +313,4 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
313 |
user_response_examples.click(load_example, inputs=[user_response_examples], outputs=[msg])
|
314 |
submit_btn.click(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
315 |
msg.submit(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
316 |
-
|
317 |
demo.launch()
|
|
|
290 |
pre_conversation_history += f"User: {chat[0]} <END_OF_TURN>\n"
|
291 |
pre_conversation_history += f"이우선: {chat[1]} <END_OF_TURN>\n"
|
292 |
conversation_history = pre_conversation_history + f"User: {user_response} <END_OF_TURN>\n"
|
293 |
+
stage_number = stage_analyzer_chain.run({'conversation_history': conversation_history, 'stage_history': stage_history})
|
294 |
stage_number = stage_number[-1]
|
295 |
stage_history += stage_number if stage_history == "stage history: " else ", " + stage_number
|
296 |
response = agent_executor.run({'input':user_response, 'conversation_history': pre_conversation_history, 'stage_number': stage_number})
|
|
|
313 |
user_response_examples.click(load_example, inputs=[user_response_examples], outputs=[msg])
|
314 |
submit_btn.click(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
315 |
msg.submit(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
|
|
316 |
demo.launch()
|