The server
folder contains the FastAPI backend of the application.
- Navigate to the
server
directory:cd server
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
- Install the required dependencies:
pip install -r requirements.txt
- go to server/.env and type your own OPENAI Key
‼️ ‼️ - Run the FastAPI server:
uvicorn main:app --host 0.0.0.0 --port 8000
The FastAPI server should now be running at http://localhost:8000
.
The client
folder contains the React frontend of the application.
- Navigate to the
client
directory:cd client
- Install the dependencies:
npm install
- Start the development server:
npm start
The React development server should now be running at http://localhost:3000
.
A Docker image of the project is available on Docker Hub:
- Run the server Docker Hub - Server Image using this command: docker run -p 8000:8000 7soonyounes/ai-container:chatpdf-backend
- Run the client Docker Hub - Client Image using this command: docker run -p 3000:3000 7soonyounes/ai-container:chatpdf-frontend
You can pull the image using the following command:
- Pull server image from docker hub.
- Pull client image from docker hub.
- Run server image from docker desktop app on port 8000.
- Run client image from docker desktop app on port 3000.
- Access app on localhost:3000.
##Youness AITHASSOUNE ##Have a GOOD DAY !!! 🚀