deeksonparlma
commited on
Commit
·
ebb2c8f
1
Parent(s):
b608be2
updates
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ def bag_of_words(s, words):
|
|
| 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,9 +67,7 @@ chatbot = gr.Chatbot(label="Chat")
|
|
| 67 |
|
| 68 |
demo = gr.Interface(
|
| 69 |
chat,
|
| 70 |
-
|
| 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__":
|