AIRider commited on
Commit
b16cf8b
·
verified ·
1 Parent(s): 844d195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -61,7 +61,7 @@ def continue_writing(message, history, system_message, max_tokens, temperature,
61
 
62
  prompt = f"이전 대화를 간단히 요약하고 이어서 작성해주세요. 마지막 응답: {last_assistant_message[:100]}..."
63
 
64
- async for response in respond(prompt, truncated_history[:-1], system_message, max_tokens, temperature, top_p, selected_model):
65
  yield response
66
 
67
  def stop_generation():
@@ -99,7 +99,9 @@ with gr.Blocks() as demo:
99
  # Event handlers
100
  msg.submit(respond, [msg, chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
101
  send.click(respond, [msg, chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
102
- continue_btn.click(continue_writing, [msg, chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
 
 
103
  regenerate_btn.click(regenerate, [chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
104
  stop.click(stop_generation, outputs=[msg])
105
  clear.click(lambda: None, outputs=[chatbot])
 
61
 
62
  prompt = f"이전 대화를 간단히 요약하고 이어서 작성해주세요. 마지막 응답: {last_assistant_message[:100]}..."
63
 
64
+ for response in respond(prompt, truncated_history[:-1], system_message, max_tokens, temperature, top_p, selected_model):
65
  yield response
66
 
67
  def stop_generation():
 
99
  # Event handlers
100
  msg.submit(respond, [msg, chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
101
  send.click(respond, [msg, chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
102
+ continue_btn.click(continue_writing,
103
+ inputs=[msg, chatbot, system_message, max_tokens, temperature, top_p, model],
104
+ outputs=[chatbot])
105
  regenerate_btn.click(regenerate, [chatbot, system_message, max_tokens, temperature, top_p, model], [chatbot])
106
  stop.click(stop_generation, outputs=[msg])
107
  clear.click(lambda: None, outputs=[chatbot])