Skip to content

Repo for a little experiment to generate content for instagram and post it using motivational quotes and some KI.

Notifications You must be signed in to change notification settings

melching/motivational-insta-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to generate images with motivational or inspirational quotes and post them to insta, automatically.



Repo for a little experiment to generate content for instagram and post it using motivational quotes and some AI.
Its goal is not to seriously create content for instagram to make a channel famous, but rather a little experiement.



Procedure

1. Get a motivational quote

As I am not really creative on a motivational level, it is clear that some quotes have to be generated or copied using external ressources.
DONE: Found a file containing various quotes. Sufficient for now.
Code in quote.py, Quotes inquotes.txt.

2. Get keywords matching the quote to use further on

Since I do not want to do any more than I have to in the process of actually creating images, some keywords have to be automatically generated using (probably) some kind of AI.
DONE: Using sentence embedding (SBERT) to generate embeddings of the quote and the words inside. Top-X selection using cosine similarity.
Code in keywords.py.

3. Get an image that can be used as background for the quote

Using the generated keywords (plus some pre-defined words like "nature"), find an image that can be used.
DONE: Pexels offers images using an API with query and size filtering. Creators have to be named in the post though!
Code in image.py.

4. Generate the image

Combine image and quote to create an image. Preferably square and readable quote.
DONE: PIL+textwrap are powerfull!
Code in image.py.

5. Identify hashtags

Using the quote, the keywords and the image, generate a list of hashtags matching the post. DONE: See 2.

6. Post the result to instagram

Automate the procedure to post it to instagram. Account: summaremovemelimetta (without "removeme")
TODO: Find previous implementation or create new one.
Code will be in insta.py


Examples:

Example Image.

About

Repo for a little experiment to generate content for instagram and post it using motivational quotes and some KI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published