edjdhug3 commited on
Commit
0eb4d48
·
1 Parent(s): 8618c19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -72,3 +72,19 @@ class Chatbot:
72
  def run_google_search(self, query):
73
  search = GoogleSerperAPIWrapper()
74
  search.run
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  def run_google_search(self, query):
73
  search = GoogleSerperAPIWrapper()
74
  search.run
75
+
76
+ if __name__ == "__main__":
77
+ chatbot = Chatbot()
78
+ data = chatbot.load_data()
79
+ docs = chatbot.split_documents(data)
80
+ retriever = chatbot.create_embeddings(docs)
81
+ qa = chatbot.create_qa_model(retriever)
82
+
83
+ st.title('Chatbot Trained on Indian Exam Articles')
84
+ st.header("Hi!! How Can I Help You ?")
85
+
86
+ query = st.text_input('> ')
87
+ result = qa({'query': query})
88
+ st.write(result['result'])
89
+ st.button('Not Satisfied! Talk to our Expert Here..')
90
+