--- title: NewsIA emoji: 📰 colorFrom: blue colorTo: red sdk: gradio sdk_version: 5.0.0 app_file: app.py pinned: false license: apache-2.0 short_description: 'AI-Powered News Generator' --- # 📰 NewsIA - AI News Generator NewsIA is an application that uses artificial intelligence to generate professional news articles from multiple sources such as documents, audio, video, URLs, and social media. ## Features - **Multiple input sources**: Documents (PDF, DOCX, XLSX, CSV), audio, video, URLs, and social media. - **Automatic transcription**: Automatically transcribes audio and video files. - **Information extraction**: Extracts relevant content from web pages and documents. - **Optimized generation**: Uses optimized models to generate news quickly and efficiently. - **Customization**: Allows adjusting the tone and length of generated news articles. ## Technologies used - **TinyLlama**: Base model optimized for performance in environments with limited resources - **Whisper**: For audio and video transcription - **Gradio**: For the user interface - **Hugging Face Spaces**: For hosting with ZeroGPU ## How to use 1. Provide **instructions** and **main facts** for your news article 2. Adjust the desired **length** and **tone** 3. Add additional sources (optional): - **Documents**: Upload PDF, DOCX, XLSX or CSV files - **Audio/Video**: Upload audio or video files for transcription - **URLs**: Add links to relevant web pages - **Social Media**: Add links to social media posts 4. Click on **Generate News** ## Installation To run this application locally: 1. Clone this repository 2. Install the required dependencies with `pip install -r requirements.txt` 3. Run the application with `python app.py` ## Environment Variables The application uses the following environment variables: - `HUGGINGFACE_TOKEN`: Your Hugging Face API token (required to access the models) ## Technical Details NewsIA uses a two-stage approach: 1. **Data Processing**: Extracts and processes information from various sources 2. **News Generation**: Uses a language model to create a coherent news article based on the processed data The application is designed to run efficiently on Hugging Face Spaces with ZeroGPU resources, using optimized memory management techniques to improve performance.