| title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned | short_description |
|---|---|---|---|---|---|---|---|---|
Autonews |
💻 |
pink |
pink |
gradio |
5.17.1 |
app.py |
false |
get news and post them |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
AutoNews is an automated system that fetches news from various RSS feeds, processes them using AI, and publishes them to a Blogger blog.
Developed by Utkarsh Gautam
- RSS feed aggregation from multiple sources (Times of India, Hindustan Times)
- AI-powered article summarization using Hugging Face's Gemma-2-2b model
- Automated publishing to Blogger platform
- SEO optimization of content
- Simple Gradio web interface
- Python 3.8+
- Hugging Face API token
- Google OAuth2 credentials for Blogger API
- Virtual environment (recommended)
- Clone the repository:
git clone <repository-url>
cd autonews- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile with:
HUGGINGFACE_API_TOKEN=your_token
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_PROJECT_ID=your_project_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:8080/
- RSS Feeds:
- Edit
processing_articles.pyto modify RSS feed sources - Current sources include Times of India and Hindustan Times sections
- Blogger Setup:
- Place your
client_secret.jsonin the root directory - Run the app once to authenticate with Google
- Start the Gradio interface:
python app.py-
Access the web interface at
http://localhost:7860 -
Click the button to:
- Fetch latest news articles
- Process and summarize content
- Post to your Blogger blog
-
News Fetching (
processing_articles.py):- Fetches RSS feeds from configured sources
- Extracts article content using newspaper3k
- Implements retry mechanism with exponential backoff
-
AI Processing:
- Uses Hugging Face's Gemma-2-2b model
- Generates SEO-optimized summaries
- Creates meta descriptions
-
Publishing (
caller.py):- Authenticates with Blogger API
- Posts processed articles
- Handles rate limiting
The application can be deployed on Hugging Face Spaces:
- Create a new Space on Hugging Face
- Configure the Space settings using the provided
README.mdfront matter - Push your code to the Space's repository
Contributions are welcome! Please feel free to submit pull requests.