diff --git a/ChatBot Using ChatterBot/Pipfile b/ChatBot Using ChatterBot/Pipfile new file mode 100644 index 0000000..b723d01 --- /dev/null +++ b/ChatBot Using ChatterBot/Pipfile @@ -0,0 +1,11 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] + +[requires] +python_version = "3.7" diff --git a/ChatBot Using ChatterBot/Requirements.txt b/ChatBot Using ChatterBot/Requirements.txt new file mode 100644 index 0000000..96228eb --- /dev/null +++ b/ChatBot Using ChatterBot/Requirements.txt @@ -0,0 +1,4 @@ +flask +ChatterBot +Spacy +Numpy \ No newline at end of file diff --git a/ChatBot Using ChatterBot/file.txt b/ChatBot Using ChatterBot/file.txt new file mode 100644 index 0000000..82e0833 --- /dev/null +++ b/ChatBot Using ChatterBot/file.txt @@ -0,0 +1,33 @@ + "Hello", + "Hi there!", + "Hi", + "Hi!", + "How are you doing?", + "I'm doing great.", + "That is good to hear", + "Thank you.", + "You're welcome.", + 'What is your name?', 'My name is Resume ChatBot', + 'Who created you?', 'Sunanda' + "Tell me about yourself", + "My name is Sunanda Somwase. I am a third year computer engineering student at PVGCOET", + "Contact", + "Email : sunandasomwase@gmail.com, Mobile number : +91 9021393816 Location : Pune, Maharashtra", + "Education", + "Bachelor of Engineering (B.E), '\n' + Computer Science & Engineering\n + Pune Vidyarthi Grihas College Of Engineering And Technology Pune '\n' + 2018 - 2022 '\n' + CGPA: 8.84/10 '\n' + Senior Secondary (XII), Science + Sir Parashurambhau College Pune Maharashtra + (MAHARASHTRA STATE BOARD board) + Year of completion: 2018 + Percentage: 88.40% + Secondary (X) + Sant Meera School Aurangabad + (MAHARASHTRA STATE BOARF board) + Year of completion: 2016 + Percentage: 96.20%", + "Projects", + "" \ No newline at end of file diff --git a/ChatBot Using ChatterBot/myapp.py b/ChatBot Using ChatterBot/myapp.py new file mode 100644 index 0000000..1b42b39 --- /dev/null +++ b/ChatBot Using ChatterBot/myapp.py @@ -0,0 +1,25 @@ + +from flask import Flask, render_template, request +from chatterbot import ChatBot +from chatterbot.trainers import ChatterBotCorpusTrainer +from chatterbot.trainers import ListTrainer + +app = Flask(__name__) + +with open('file.txt','r') as file: + conversation = file.read() + +bot = ChatBot("Sunanda's Resume ChatBot") +trainer = ListTrainer(bot) +trainer.train(conversation) + +@app.route("/") +def home(): + return render_template("home.html") + +@app.route("/get") +def get_bot_response(): + userText = request.args.get('msg') + return str(bot.get_response(userText)) +if __name__ == "__main__": + app.run() \ No newline at end of file diff --git a/ChatBot Using ChatterBot/templates/home.html b/ChatBot Using ChatterBot/templates/home.html new file mode 100644 index 0000000..0b9c930 --- /dev/null +++ b/ChatBot Using ChatterBot/templates/home.html @@ -0,0 +1,145 @@ + + +
+Hello there! I am Sunanda's Resume ChatBot +
+