A dynamic web content generator that creates pages on-the-fly using AI. Simply search for any topic or navigate to any URL path, and the application will generate relevant content for that route.
- AI-Generated Content: Uses Google's Gemini 2.0 Flash model to generate HTML content for any URL path.
- Dynamic Routing: Visit any URL path to get AI-generated content specifically for that path.
- Search Interface: Simple search functionality that redirects to the generated content.
- Content Persistence: Automatically saves generated content to the filesystem for faster access in future requests.
- Organized Structure: Maintains proper directory structure based on URL paths.
- Index of Saved Content: Automatically generates an index of all saved pages.
- Python 3.7 or higher
- Google Gemini API key
-
Clone this repository:
https://github.com/TheLime1/infinite-ai-web cd infinite-ai-web
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root with your Google Gemini API key:GEMINI_API_KEY=your_api_key_here
Run the Flask application:
python infinite_web.py
The server will start at http://localhost:5000 by default.
- Homepage: Visit the root URL
/
to see the search interface. - Direct Path Navigation: Enter any path like
/python-tutorial
or/history/ancient-rome
in your browser to generate content for that topic. - Search: Use the search box to look for a topic. The search will convert your query to a URL path and generate content.
- View Saved Pages: Click on "Saved Searches" to see an index of all previously generated pages.
- When a user visits a URL path, the application first checks if content has been previously generated and saved.
- If found, the application serves the saved content.
- If not found, the application generates the content using the Gemini AI model.
- The AI-generated content is then saved to the file system for future requests.
- The application maintains a proper directory structure that matches the URL path structure.
- generate more complex content
- generate images
- toggle between different AI models
- generate links to external sources
- generate links that go deeper into the topic
- automate HTML dumbing to another repo with a cron job
- make diffrent colors for links (links not generated yet vs links generated and saved vs external links)
Model | Speed | Complexity | Image Generation |
---|---|---|---|
Gemini 2.0 Flash | Fast | Medium | No |
Gemini 1.5 Flash Exp | Medium | High | Yes |
Gemini 1.5 Pro | Slow | High | didnt test yet |
Contributions are welcome! Please feel free to submit a Pull Request.