This project, named the Prompt Generator, is a Flask web application designed to leverage the Generative AI API. It allows users to interact with a generative model to create structured prompts or explore random prompts. The web interface provides a seamless experience for users to generate creative prompts based on their input or discover unique prompts at random.
app
- instruction/
- file
- static/
- icon/
- file
- style/
- file
- font/
- file
- script/
- file
- template/
- file
- .env
- app.py
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/1999AZZAR/GPT-Advace-prompt-generator
-
Navigate to the project directory.
-
Install the required dependencies:
pip install flask python-dotenv google-generativeai
-
Obtain a Generative AI API key by following the instructions here.
-
Add your API key to the
.env
file:GENAI_API_KEY=your_api_key_here
-
Run the Flask application:
python app.py
-
Open your web browser and go to http://localhost:5000.
-
Structured Prompt Generation: Enter text in the input box on the homepage and click "Generate" to receive a structured prompt based on your input.
-
Random Prompt Exploration: Click "Random" to explore a randomly generated prompt without providing specific input.
-
app.py: The main Flask application file. It handles routing and connects the web interface to the generative model.
-
generative_model.py: This file contains the code for the generative model. It includes functions for generating responses and random prompts.
-
template/generator.html: The HTML template for the web interface. It includes the structure for user input, displaying responses, and styling.
The primary purpose of this project is to create a user-friendly interface for interacting with the Generative AI API. It empowers users to effortlessly generate both structured and random prompts, providing a versatile tool for creative exploration.
graph TD
A[User] -->|1. Enters text| B[Web Interface]
B -->|2. Sends request| C[app.py]
C -->|3. Processes input| D[generative_model.py]
D -->|4. Generates response| E[Web Interface]
E -->|5. Displays response| B
style A fill:#3D065A,stroke:#3D065A,stroke-width:2px;
style B fill:#B51A62,stroke:#B51A62,stroke-width:2px;
style C fill:#BF3131,stroke:#BF3131,stroke-width:2px;
style D fill:#BF3131,stroke:#BF3131,stroke-width:2px;
style E fill:#B51A62,stroke:#B51A62,stroke-width:2px;
- Flask: Flask Documentation
- python-dotenv: python-dotenv Documentation
- google-generativeai: Generative AI Documentation
This project is licensed under [License Name]. See the LICENSE.md file for details.