deeksonparlma commited on
Commit
ebb2c8f
·
1 Parent(s): b608be2
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -45,7 +45,7 @@ def bag_of_words(s, words):
45
  return np.array(bag)
46
 
47
 
48
- def chat(message, history):
49
  history = history or []
50
  message = message.lower()
51
  results = model.predict([bag_of_words(message, words)])
@@ -67,9 +67,7 @@ chatbot = gr.Chatbot(label="Chat")
67
 
68
  demo = gr.Interface(
69
  chat,
70
- [gr.Textbox(lines=1, label="Message"), "state"],
71
- [chatbot, "state"],
72
- allow_flagging="never",
73
  title="Tabibu | Mental Health Bot",
74
  )
75
  if __name__ == "__main__":
 
45
  return np.array(bag)
46
 
47
 
48
+ def chat(message):
49
  history = history or []
50
  message = message.lower()
51
  results = model.predict([bag_of_words(message, words)])
 
67
 
68
  demo = gr.Interface(
69
  chat,
70
+ outputs="label",
 
 
71
  title="Tabibu | Mental Health Bot",
72
  )
73
  if __name__ == "__main__":