wannaphong commited on
Commit
f538e91
·
1 Parent(s): 8a5e05e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -252,7 +252,7 @@ def gen_chatbot_old(text):
252
  def list2prompt(history):
253
  _text = ""
254
  for user,bot in history:
255
- _text+=": "+user+"\n: "
256
  if bot!=None:
257
  _text+=bot+"\n"
258
  return _text
@@ -356,7 +356,7 @@ with gr.Blocks(height=900) as demo:
356
  feedback_gen_submit.click(fn=save_up2, inputs=[instruction, input,outputs,max_len,temp,top_p,gen_radio,feedback_gen], outputs=[feedback_gen_box,feedback_gen_ok], queue=False)
357
  inputs = [instruction, input, max_len, temp, top_p]
358
  run_botton.click(fn=gen, inputs=inputs, outputs=[outputs,feedback_gen_box,feedback_gen_ok])
359
- examples = gr.Examples(examples=['อยากลดความอ้วนทำไง','จงแต่งเรียงความเรื่องความฝันของคนรุ่นใหม่ต่อประเทศไทย'],inputs=[instruction])
360
  with gr.Tab("ChatBot"):
361
  with gr.Column():
362
  chatbot = gr.Chatbot(label="Chat Message Box", placeholder="Chat Message Box",show_label=False).style(container=False)
 
252
  def list2prompt(history):
253
  _text = ""
254
  for user,bot in history:
255
+ _text+="<human>: "+user+"\n<bot>: "
256
  if bot!=None:
257
  _text+=bot+"\n"
258
  return _text
 
356
  feedback_gen_submit.click(fn=save_up2, inputs=[instruction, input,outputs,max_len,temp,top_p,gen_radio,feedback_gen], outputs=[feedback_gen_box,feedback_gen_ok], queue=False)
357
  inputs = [instruction, input, max_len, temp, top_p]
358
  run_botton.click(fn=gen, inputs=inputs, outputs=[outputs,feedback_gen_box,feedback_gen_ok])
359
+ examples = gr.Examples(examples=["แต่งกลอนวันแม่","แต่งกลอนแปดวันแม่",'อยากลดความอ้วนทำไง','จงแต่งเรียงความเรื่องความฝันของคนรุ่นใหม่ต่อประเทศไทย'],inputs=[instruction])
360
  with gr.Tab("ChatBot"):
361
  with gr.Column():
362
  chatbot = gr.Chatbot(label="Chat Message Box", placeholder="Chat Message Box",show_label=False).style(container=False)