Royals404 commited on
Commit
3b4acd6
1 Parent(s): fea639b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def qa_interface(question):
4
+ QUESTION = question
5
+ PROMPT = " You are an empathetic mental health chatbot. input: " + QUESTION + "output:"
6
+
7
+ json_op = predict_large_language_model_sample(PROMPT)
8
+ return json_op
9
+
10
+ iface = gr.Interface(fn=qa_interface,
11
+ inputs=[
12
+ gr.Textbox(label="Enter your queries")
13
+ #, gr.Slider(0, 1, 0.3)
14
+ #, gr.Slider(0, 1, 1)
15
+ #, gr.Slider(0, 1024, 700)
16
+ #, gr.Slider(0, 40, 40)
17
+
18
+
19
+ ],
20
+ outputs=[
21
+ gr.Textbox(label="Bot"),
22
+
23
+ ],
24
+ title="Mental Health ChatBot ",
25
+ description="Emphathetic Mental Health bot",
26
+ allow_flagging=False,
27
+ theme=gr.themes.Soft()
28
+ )
29
+
30
+ iface.launch(share=True)