Football chatbot crafted with a Mistral AI model, Langchain & Flask framework
This is a school project which aim was to create an innovative chatbot capable of using Natural Langage Processing (NLP) to retreive answers from a string-typed database.
The database was scraped using Langchain.
We chose to focus on the sport topic, precisely, football. Footix the chatbot allows the user to ask information about anything related to football. Then, it gives back the corresponding answer, using NLP, within 10 seconds!
We had 14 days to implement the project. We made it in 5.
Here, you can find the source code of Footix, the football chatbot, but the algorithm could be adapted to any kind of subject. We also added a scraping script we coded to be able to retreive the european championship scores : scraping.py
Enregistrement.de.l.ecran.2024-02-02.a.11.28.25.mp4
(No sound for compressing reasons)
- Python 3.11.7
- Flask 3.0.1
- Werkzeug 3.0.1
- Langchain
- Mistral 7B
- Javascript
- HTML/CSS
1- If not done, install Python:
https://www.python.org/downloads/
2- Install Langchain:
pip install langchain
3- Install Flask:
pip install flask
pip install flask_cors
4- Follow the possible package installations that will be asked by the Langchain dependances
5- Run the app.py
file:
python app.py
6- Go onto your local webserver, paste this url on your browser:
http://127.0.0.1:5000/api/chat
results.csv
data), you need to go into the bot.py
file, uncomment the line 24 and comment the line 25
- Prompt about football
Project made by
- @MattisFernandez, AI Engineer
- @ael-tek, AI Engineer
- @CyriacduChatenet, Developer
- @Juliette-Dupin, Developer
Project is: finished since Friday, February 2, 2024
- The chatbot's name, Footix, is a French denomination. Nowadays, the word "Footix" can be considered the worst insult to say to a football fan, meaning they don't know football or start following a team because they won.
- No one on the team likes football. One is a fan of hockey, another one of rugby, another one likes horse riding and the another swimming. In short, we don't like football. But we chose this sport 'cause people tend to like it.