Skip to content

mayank-dev07/post-generator

Repository files navigation

social-post-generator

This tool analyzes a user's past social posts and helps them create new posts — for LinkedIn, X (Twitter), or Instagram — that match their writing style.

Let's say Mohan is a content creator. He feeds his past posts into this tool, which extracts the key topics, languages, and lengths. He then picks a platform, a topic (or multiple), a length, a language, and optionally adds extra context — and clicks Generate to produce a new post in his own voice. If he likes it, he clicks Accept to save it back into the training corpus; if not, he clicks Retry for a stylistic variation.

Technical Architecture

Architecture

  1. Stage 1: Collect past posts and extract Topic, Language, Length, and Platform from them.
  2. Stage 2: Use the selected topic(s), language, length, and platform to generate a new post. Past posts matching that filter are used as few-shot examples to guide the LLM on writing style. Platform-specific rules (hashtag count, tone, emoji use) are applied as defaults, and user-supplied "Additional context" overrides them when they conflict.
  3. Stage 3: Accepted posts are appended to the corpus, so the tool keeps improving on the user's own feedback.

Set-up

  1. Get an API key from https://console.groq.com/keys. Inside .env, set GROQ_API_KEY to the key you created.
  2. Install dependencies:
    pip install -r requirement.txt
    
  3. Run the Streamlit app:
    streamlit run main.py
    

Copyright (C) Mayank Dev. All rights reserved.

Additional Terms: This software is licensed under the MIT License. Commercial use is strictly prohibited without prior written permission from the author. Attribution must be given in all copies or substantial portions of the software.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages