Code Monkey home page Code Monkey logo

1999azzar / prompt-generator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.11 MB

Prompt Generator is a Flask web app employing the Generative AI API. Users create custom or random prompts, exploring creative possibilities. Structured or spontaneous, the tool fosters seamless interaction, making prompt generation intuitive and enjoyable.

Python 20.81% CSS 31.39% HTML 28.78% JavaScript 19.02%
gemini-api llm prompt-engineering prompt-generator prompt-toolkit prompts flask-application

prompt-generator's Introduction

Propmt generator

Overview

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.

Project Structure

app
     - instruction/
          - file
     - static/
          - icon/
              - file
          - style/
               - file
          - font/
               - file
          - script/
               - file
     - template/
          - file
     - .env
     - app.py

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/1999AZZAR/GPT-Advace-prompt-generator
  2. Navigate to the project directory.

  3. Install the required dependencies:

    pip install flask python-dotenv google-generativeai

Configuration

  1. Obtain a Generative AI API key by following the instructions here.

  2. Add your API key to the .env file:

    GENAI_API_KEY=your_api_key_here

Usage

  1. Run the Flask application:

    python app.py
  2. Open your web browser and go to http://localhost:5000.

  3. Structured Prompt Generation: Enter text in the input box on the homepage and click "Generate" to receive a structured prompt based on your input.

  4. Random Prompt Exploration: Click "Random" to explore a randomly generated prompt without providing specific input.

Files

  • 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.

Purpose

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.

Flowchart

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;
Loading

Dependencies

Contributors

License

This project is licensed under [License Name]. See the LICENSE.md file for details.

prompt-generator's People

Contributors

1999azzar avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.