shljessie commited on
Commit
a2feab1
·
1 Parent(s): 4e3bf2c

update chat function

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -39,9 +39,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
39
  # def chatbot_interface(user_input):
40
  # return generate_response(user_input)
41
 
 
 
 
 
 
 
42
  # Create the Gradio interface
43
  iface = gr.Interface(
44
- fn=chatbot_interface,
45
  inputs=gr.inputs.Textbox(lines=2, placeholder="Type your message here..."),
46
  outputs="text",
47
  title="Llama-2 7B Chatbot",
 
39
  # def chatbot_interface(user_input):
40
  # return generate_response(user_input)
41
 
42
+ def yes_man(message, history):
43
+ if message.endswith("?"):
44
+ return "Yes"
45
+ else:
46
+ return "Ask me anything!"
47
+
48
  # Create the Gradio interface
49
  iface = gr.Interface(
50
+ fn=yes_man,
51
  inputs=gr.inputs.Textbox(lines=2, placeholder="Type your message here..."),
52
  outputs="text",
53
  title="Llama-2 7B Chatbot",