BlogGen AI is a web-based application that leverages advanced NLP through LLaMA 2 and the Huggingface endpoint (via LangChain) to generate high-quality blog posts. With a user-friendly Streamlit interface, users can input a topic, select tone, target audience, word count, and style preferences to generate a fully formatted blog post complete with an estimated read time. Additionally, the application integrates web search functionalities—initially via DuckDuckGo and later upgraded to the Tavily Search API—to enrich content with dynamic, contextually relevant information.
-
Intuitive UI:
A clean and responsive interface built with Streamlit for easy input of blog topics, tone, target audience, and more. -
Advanced Blog Generation:
Leverages LLaMA 2 through a Huggingface endpoint integrated via LangChain to generate coherent blog posts. -
Customizable Content:
Input parameters like tone, audience, word count, and blog styles allow users to tailor the output. -
Dynamic Web Search Integration:
Initially using DuckDuckGo search, upgraded to the Tavily Search API for enriched, context-aware content. -
Post-Processing Enhancements:
Automatically calculates estimated read time and formats the blog output with options for including author names. -
Robust Error Handling:
Built-in validations and prompt template refinements ensure consistency and high-quality content generation.
The application follows a modular architecture:
[User]
│
▼
[Web Browser (Streamlit UI)]
│
▼
[Backend Python Server]
│
▼
[Huggingface Endpoint via LangChain] <--> [LLaMA 2 Model]
│
▼
[Web Search Tools (DuckDuckGo/Tavily Search API)]
│
▼
[Content Processing & Formatting Module]
│
▼
[Final Blog Post Display]
This design ensures that the UI, processing, and content generation components interact seamlessly to deliver a robust user experience.
-
Access the Application:
Click the generated url by ngrok for
http://localhost:8501in the colab notebook. Fill in the form with your desired blog topic, tone, target audience, word count, and other settings, then submit to generate your blog post. -
Interacting with the UI:
- Input Form:
Provide details like blog topic, tone, and target audience. - Dynamic Content Generation:
The backend processes the input via the Huggingface endpoint, enriches content with integrated web search, and outputs a formatted blog post. - Post-Generation Options:
Review, edit, or download the generated content directly from the interface.
- Input Form:
-
UI Input Validation:
Ensured all form fields accept valid data and error messages display for invalid entries. -
End-to-End Functionality:
Tested complete blog generation flow—from input submission to blog post output. -
Prompt Template Testing:
Conducted multiple tests using varied inputs to verify consistency and coherence of generated blogs. -
Edge Case Handling:
Simulated scenarios with empty inputs, long text strings, and special characters to verify error handling. -
Performance & Load Testing:
Simulated concurrent requests to ensure system stability and responsiveness.
- Fixed integration issues between Streamlit UI and backend API endpoints.
- Improved handling of input timeout scenarios.
- Optimized prompt templates to enhance output quality.
- Enhanced API call logic for smoother integration with web search tools.
- Made UI adjustments based on user feedback for better navigation and responsiveness.
- Requirement Fulfillment:
The system meets all initial requirements, providing customizable and dynamic blog generation with integrated web search functionality. - Feature Integration:
All modules work seamlessly together, delivering a smooth user experience and high-quality content output.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear commit messages.
- Submit a pull request detailing your changes.
For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.
Happy coding and enjoy generating your next blog with BlogGen AI!
