SungBeom commited on
Commit
9f8b9c3
1 Parent(s): 7f0775b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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[1:]})
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()