This repository contains a Python script that automatically generates an image based on a news headline. The script uses the NewsAPI to fetch the latest headlines, and then generates an image using the DiffusionPipeline from the diffusers
Python package for Text-to-Image task.
The script is scheduled to run every few minutes. Each time it runs, it fetches a new headline and generates a new image, which is then displayed below. The image generation process is performed on a GPU.
Below is the latest generated image:
The latest news headline used to generate the image is:
Oleksandr Usyk beats Tyson Fury again as highly anticipated rematch goes the distance
You can read more about it here.
- Python 3.8
- Hugging Face account
- NewsAPI key
diffusers
Python packageinvisible_watermark
Python packagetransformers
Python packageaccelerate
Python packagesafetensors
Python package