Write tweets with AI Agents (CrewAI)
![](https://raw.githubusercontent.com/curiousily/tweetcrafter/master/.github/tweetcrafter.png)
Clone the repo
git clone git@github.com:curiousily/tweetcrafter.git
cd tweetcrafter
poetry install
Install iPython kernel:
poetry run python -m ipykernel install --user --name tweetcrafter --display-name "Python (tweetcrafter)"
Create a .env
file in the root of the project and add your Groq and/or OpenAI API keys:
GROQ_API_KEY=<GROQ_API_KEY>
OPENAI_API_KEY=<OPENAI_API_KEY>
Go to app.py
and change the inputs:
inputs = {
"topic": "Summary of the key new features of Phi-3",
"urls": [
"https://huggingface.co/microsoft/Phi-3-vision-128k-instruct",
],
"suggestion": "Focus on the performance and how-to use the model.",
}
Add tweets to analyze their writing style in data/tweets.md
:
# Tweet
Ever wondered how to reproduce GPT-2 (124M) efficiently?
@karpathy with llm.c has the answer!
- 90 mins, $20 on 8X A100 80GB SXM
- FineWeb dataset: 10B tokens
- MFU: 49-60%, 178K tokens/sec
https://github.com/karpathy/llm.c/discussions/481
Run the app:
poetry run python app.py
{
"total_tokens":12334,
"prompt_tokens":10260,
"completion_tokens":2074,
"successful_requests":8
}
The tweets I got from the crew (saved to output/tweet.md
):
Original Tweet:
"Meet Phi-3, the cutting-edge AI model revolutionizing NLP! ππ»
β’ Processes human language efficiently and accurately
β’ Ideal for NLP, text gen, conversational AI, sentiment analysis, and language translation
β’ Transparent, accountable, and fair decision-making
β’ Trained on diverse datasets and compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAI
Version 1:
"Unlock the power of Phi-3, the AI model that's changing the NLP game! ππ»
β’ Efficient and accurate language processing
β’ Perfect for text gen, conversational AI, sentiment analysis, and language translation
β’ Transparency, accountability, and fairness in decision-making
β’ Compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAI
Version 2:
"Take your NLP projects to the next level with Phi-3! ππ»
β’ Fast and accurate language processing
β’ Ideal for conversational AI, sentiment analysis, and language translation
β’ Built with transparency, accountability, and fairness in mind
β’ Compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAI
Version 3:
"Discover the future of NLP with Phi-3! ππ»
β’ Efficient language processing for text gen, conversational AI, and more
β’ Transparent, accountable, and fair decision-making
β’ Trained on diverse datasets and compatible with TensorFlow and PyTorch
β’ Revolutionize your NLP projects with Phi-3
#Phi3 #AI #NLP #LanguageModel #ResponsibleAI
TweetCrafter stores logs of prompts and individual agent logs in the logs
directory.
Have a look at the notebooks/explore-logs.ipynb
notebook to explore the logs.