codemogul commited on
Commit
74c5911
·
1 Parent(s): 0f74143

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -11,9 +11,11 @@ import json
11
  import pandas as pd
12
  import pickle
13
  import gradio as gr
14
-
 
15
  stemmer = LancasterStemmer()
16
 
 
17
  with open("intents.json") as file:
18
  data = json.load(file)
19
 
@@ -120,6 +122,9 @@ height: 70vh !important;
120
  }
121
 
122
  """
 
 
 
123
  demo = gr.Interface(
124
  chat,
125
  [gr.Textbox(lines=1, label="Message"), "state"],
 
11
  import pandas as pd
12
  import pickle
13
  import gradio as gr
14
+ from chitra.serve import create_api
15
+ from transformers import pipeline
16
  stemmer = LancasterStemmer()
17
 
18
+ classifier = pipeline("Mental_Health_Bot")
19
  with open("intents.json") as file:
20
  data = json.load(file)
21
 
 
122
  }
123
 
124
  """
125
+
126
+ cr_api = create_api(classifier,run=False,api_type="text-classification")
127
+ cr_api.run()
128
  demo = gr.Interface(
129
  chat,
130
  [gr.Textbox(lines=1, label="Message"), "state"],