NinaMwangi commited on
Commit
7edb0ad
·
verified ·
1 Parent(s): 3582735

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def generate_answer(question, chat_history):
42
  #return tokenizer.decode(outputs[0], skip_special_tokens=True)
43
 
44
  answer = tokenizer.decode(outputs[0], skip_special_tokens=True).strip()
45
- chat_history.append((question, answer))
46
  return "", chat_history
47
 
48
  # === Gradio UI ===
@@ -76,7 +76,8 @@ with gr.Blocks(theme=gr.themes.Base()) as interface:
76
  outputs=[question_box, chatbot],
77
  )
78
 
79
- clear_btn.click(lambda: [], inputs=[], outputs=[chatbot, state])
 
80
 
81
  # === Launch the app ===
82
  interface.launch(share=True)
 
42
  #return tokenizer.decode(outputs[0], skip_special_tokens=True)
43
 
44
  answer = tokenizer.decode(outputs[0], skip_special_tokens=True).strip()
45
+ chat_history.append([question, answer])
46
  return "", chat_history
47
 
48
  # === Gradio UI ===
 
76
  outputs=[question_box, chatbot],
77
  )
78
 
79
+ clear_btn.click(lambda: ([], []), inputs=[], outputs=[chatbot, state])
80
+
81
 
82
  # === Launch the app ===
83
  interface.launch(share=True)