erichilarysmithsr patti-j commited on
Commit
077944a
0 Parent(s):

Duplicate from patti-j/omdena-mental-health

Browse files

Co-authored-by: Patti Jorgensen <[email protected]>

Files changed (5) hide show
  1. .gitattributes +34 -0
  2. README.md +13 -0
  3. app.py +50 -0
  4. requirements.txt +1 -0
  5. response.py +5 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Omdena Mental Health
3
+ emoji: 🌍
4
+ colorFrom: yellow
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 3.29.0
8
+ app_file: app.py
9
+ pinned: false
10
+ duplicated_from: patti-j/omdena-mental-health
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Import dependencies
2
+ import gradio as gr
3
+
4
+
5
+ """class ChatWrapper:
6
+
7
+ def __call__(
8
+ self, inp: str, history: str, chain
9
+ ):
10
+ Execute the chat functionality.
11
+ output = chain({"question": inp, "chat_history": history})["answer"]
12
+ history.append((inp, output))
13
+ return history, history
14
+
15
+
16
+ chat = ChatWrapper()"""
17
+
18
+ chatbot = gr.Chatbot()
19
+
20
+ block = gr.Blocks(css=".gradio-container {background-color: lightblue}")
21
+
22
+ with block:
23
+ gr.HTML("<center><h2>Omdena AI Chatbot For Mental Health and Well Being</h2></center>")
24
+
25
+ gr.HTML("WELCOME<br>"
26
+ "I am an AI ChatBot and I am here to assist you with whatever is bothering you."
27
+ "Our conversation is strictly confidential and I will not remember it when you come back another time."
28
+ )
29
+
30
+ with gr.Row():
31
+ message = gr.Textbox(
32
+ label="What would you like to talk about?",
33
+ )
34
+
35
+ with gr.Row():
36
+ submit = gr.Button(color="lightblue", value="Send", variant="secondary").style(full_width=False)
37
+
38
+ gr.Examples(
39
+ examples=[
40
+ "I am lonely",
41
+ "I'm having problems at home",
42
+ "I am jumpy when I hear a loud noise and I feel scared all the time",
43
+ ],
44
+ inputs=message,
45
+ )
46
+
47
+
48
+ # submit.click(chat, inputs=[message], outputs=[chatbot])
49
+
50
+ block.launch(debug=True)
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio
response.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+
2
+
3
+ def response(message):
4
+ return "Hello " + message + "!!"
5
+