This project consists of a Flask backend and a React frontend for chatting with PDFs using the Gemini API.
-
Clone the repository:
git clone <repository-url> cd pdf-chat-app -
Set up the virtual environment:
python -m venv pdf_chat_env -
Activate the virtual environment:
- On Windows:
pdf_chat_env\Scripts\activate - On macOS and Linux:
source pdf_chat_env/bin/activate
- On Windows:
-
Install backend dependencies:
cd backend pip install -r requirements.txt cd .. -
Install frontend dependencies:
cd frontend npm install cd ..
-
Make sure your virtual environment is activated.
-
Start the backend server:
cd backend python app.py -
In a new terminal, start the frontend development server:
cd frontend npm start -
Open your browser and navigate to
http://localhost:8080to use the application. -
When you're done, deactivate the virtual environment:
deactivate
- Backend server runs on port 8000
- Frontend development server runs on port 8080
If you need to change these ports, update the following files:
- Backend:
backend/app.py - Frontend:
frontend/package.jsonand API calls in React components