AI HTML Generator is a web tool that allows users to generate and edit HTML content based on text prompts. Users can type a prompt, submit it, and the tool will generate corresponding HTML code, which can be saved as an .html file. The HTML generation is powered by a local Ollama server, which is hosted using Python's http.server module. Additionally, users can modify the generated HTML by submitting follow-up prompts.
- Generate HTML: Input a prompt and click "Generate HTML" to receive a dynamic HTML block generated by the Ollama server.
- Edit HTML: Users can modify the generated HTML by submitting follow-up prompts to update the content.
- Preview Generated HTML: View the generated HTML content directly on the page.
- Save HTML to File: Save the generated HTML code as a downloadable
.htmlfile by providing a custom file name. - Responsive Design: The interface is responsive and works well across different screen sizes.
- HTML5: Structure of the page and form elements.
- Tailwind CSS: Utility-first CSS framework used for styling and responsive design.
- JavaScript: Handles form submission, generating HTML, and file-saving functionality.
- Fetch API: Used to make API requests for generating and editing HTML content from the provided prompt.
- Ollama Local Server: Powers the HTML generation process. The server processes the input prompt and returns the corresponding HTML.
- Python
http.server: Python's built-in HTTP server module used to host the Ollama server locally.
You can try the tool by simply typing your prompt into the input field, then click "Generate HTML" to see the generated HTML content. You can also modify the content by submitting a follow-up prompt, and save it to a file by entering a name in the modal popup.
- Clone the repository to your local machine.
git clone https://github.com/your-username/page-designer.git install.bat run.bat