This project is a simple chatbot application featuring a Next.js frontend and a Flask backend. It allows users to inquire about sushi restaurants or parking garages near Marienplatz, Munich, and get detailed information through a conversational interface.
Below are the instructions to set up the frontend and backend locally on your machine.
The backend is developed with Flask. To get it up and running, follow these steps:
- Navigate to the backend directory:
cd chatbot-backend
- Activate your virtual environment
- for Windows:
.\venv\Scripts\activate
- for macOS/Linux:
source venv/bin/activate
- Install necessary packages
pip install -r requirements.txt
-
Create .env file with your OpenAI API key and name it OPENAI_API_KEY
-
Start the Flask application
flask run
The frontend is built with Next.js and styled using Tailwind CSS. To start the frontend, execute the following:
- Navigate to the frontend directory:
cd chatbot-frontend
- Install the necessary packages:
npm install
- Run the Next.js development server:
npm run dev
Now, your frontend should be accessible at http://localhost:3000, and your backend should be running on http://localhost:5000.
The experiments directory contains notebooks to test new approaches or code snippets and functions before implementing.
To run embeddings.ipynb, another .env file needs to be created with OPEN_API_KEY. You can also copy your .env file from the chatbot-backend directory and paste it in here.