A Streamlit web application that fetches recent news articles based on user queries and provides AI-generated summaries using One AI's summarization capabilities. The app helps users stay informed by providing quick access to news with concise summaries.
- News Search: Search for news articles on any topic
- AI-Powered Summaries: Get concise summaries of articles using One AI's natural language processing
- Article Preview: View full articles with their original images
- User-Friendly Interface: Clean and intuitive design built with Streamlit
- Expandable Content: Toggle between summary and full article text
- Python 3.10+
- Streamlit: For the web interface
- NewsAPI: To fetch recent news articles
- One AI: For article summarization
- Newspaper3k: For article parsing and content extraction
- Clone the repository:
git clone https://github.com/rajeshai/news-oneai-streamlit.git
cd news-summarization-app
- Install the required packages:
pip install -r requirements.txt
-
Set up your API keys:
- Get a NewsAPI key from NewsAPI.org
- Get a One AI API key from One AI
-
Create a
.env
file in the project root and add your API keys:
NEWS_API_KEY=your_news_api_key_here
ONE_AI_API_KEY=your_one_ai_api_key_here
- Run the Streamlit app:
streamlit run app.py
-
Open your web browser and navigate to
http://localhost:8501
-
Enter a search term in the text input field
-
Click "Submit" to fetch and summarize news articles
Create a requirements.txt
file with the following dependencies:
streamlit
newsapi-python
newspaper3k
requests
python-dotenv
news-summarization-app/
├── app.py # Main application file
├── .env # Environment variables (API keys)
├── requirements.txt # Project dependencies
├── README.md # Project documentation
└── assets/
└── logo.jpg # Application logo
- NewsAPI Documentation
- Used for fetching news articles
- Free tier includes:
- 100 requests per day
- Access to recent articles
- Multiple news sources
- One AI Documentation
- Used for article summarization
- Features include:
- Text Summarization
- Sentiment Analysis
- Named Entity Recognition
- Topic Analysis
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement
) - Make your changes
- Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/improvement
) - Create a Pull Request
- NewsAPI for providing access to news articles
- One AI for their powerful text summarization API
- Streamlit for the awesome web framework
⭐️ Star this repo if you find it useful!