Gistify is a web application that summarizes content from a given URL using the Gemini API and displays the summary along with relevant statistics.
The project is divided into two main parts:
backend/
: Contains the Python Flask application that handles fetching content, calling the Gemini API for summarization, and serving the API endpoints.frontend/
: Contains the React application built with Vite that provides the user interface for inputting URLs and displaying the summarization results.
Before you begin, ensure you have the following installed:
- Python 3.7+ - Node.js (LTS version recommended) - npm or yarn - Git
Follow these steps to set up and run the Gistify application locally.
If you haven't already, clone the project repository:
git clone https://github.com/xthxr/gistify.git
cd gistify
Navigate to the backend directory:
cd backend
Create a Virtual Environment
It's recommended to use a virtual environment to manage dependencies:
python -m venv venv
Activate the Virtual Environment
-
On Windows:
.\venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
Install the required Python packages:
pip install -r requirements.txt
Set up Environment Variables
Create a .env file in the backend/ directory with your Gemini API key:
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
Replace YOUR_GEMINI_API_KEY with your actual API key obtained from the Google AI Studio or Google Cloud.
Make sure your virtual environment is activated and you are in the backend/ directory. Then run the Flask application:
python app.py
The backend server should start and run on http://192.168.something.something:5000/ or a similar address.
Open a new terminal window or tab and navigate to the frontend directory:
cd ..
cd frontend
Install the required Node.js packages using npm or yarn:
npm install
# or
yarn install
Create a .env file in the frontend/ directory to specify the backend API URL:
VITE_BACKEND_API_URL=http://
localhost:5000
Make sure you are in the frontend/ directory. Then start the development server:
npm run dev
# or
yarn dev
The frontend application should open in your browser, usually at http://localhost:5173/ or a similar address.
- Ensure both the backend and frontend servers are running.
- Open the frontend application in your web browser.
- Enter the URL of the content you want to summarize in the input field.
- Click the "Summarize" button.
- The summarization result, including the summary text, original length, summary length, and reduction percentage, will be displayed.
If you'd like to contribute, please fork the repository and create a pull request.
- xthxr (https://github.com/xthxr)
- ankit (https://github.com/Iankitsinghak)
- roky (https://github.com/R47148)
- subhankar (https://github.com/suvancodes)