A web application that uses AI to analyze and summarize news articles about any topic.
NewsAI/
├── backend/
│ ├── app/
│ │ ├── main.py
│ │ ├── fetch_google_results.py
│ │ └── summarize.py
│ └── requirements.txt
└── frontend/
└── src/
├── App.tsx
├── App.css
└── services/
└── api.ts
-
Navigate to the backend directory:
cd backend -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the backend directory with your API keys:GOOGLE_API_KEY=your_google_api_key GOOGLE_CSE_ID=your_custom_search_engine_id OPENAI_API_KEY=your_openai_api_key -
Run the backend server:
uvicorn app.main:app --reload
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173 - Enter a topic in the search box
- Click "Search" to get AI-generated insights from recent news articles
- Click on source links to read the original articles
- Real-time news search and analysis
- AI-powered insights extraction
- Source attribution and links
- Modern, responsive UI
- Error handling and loading states