{"id":22432681,"url":"https://github.com/1999azzar/streamlit_promptgen","last_synced_at":"2025-07-27T23:33:44.078Z","repository":{"id":240410457,"uuid":"802557290","full_name":"1999AZZAR/streamlit_promptgen","owner":"1999AZZAR","description":"a versatile tool for generating prompts for both text and image inputs","archived":false,"fork":false,"pushed_at":"2024-05-21T11:52:35.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T12:45:48.414Z","etag":null,"topics":["gemini","generative-ai","prompt","prompt-engineering","streamlit-application"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-18T16:22:38.000Z","updated_at":"2024-05-21T11:52:39.000Z","dependencies_parsed_at":"2024-05-21T13:07:40.848Z","dependency_job_id":null,"html_url":"https://github.com/1999AZZAR/streamlit_promptgen","commit_stats":null,"previous_names":["1999azzar/stramlit-trial"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstreamlit_promptgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstreamlit_promptgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstreamlit_promptgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstreamlit_promptgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/streamlit_promptgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806038,"owners_count":20675291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gemini","generative-ai","prompt","prompt-engineering","streamlit-application"],"created_at":"2024-12-05T22:12:33.053Z","updated_at":"2025-03-27T07:42:47.500Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prompt Sanctuary (streamlit)\n\nWelcome to Prompt Sanctuary, a versatile tool for generating prompts for both text and image inputs. This README provides detailed instructions on how to set up and run the application.\n\n## Table of Contents\n\n- [Prompt Sanctuary (streamlit)](#prompt-sanctuary-streamlit)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Installation](#installation)\n  - [Running the Application](#running-the-application)\n  - [Structure of the Code](#structure-of-the-code)\n  - [Credits](#credits)\n  - [See on streamlitx](#see-on-streamlitx)\n\n## Introduction\n\nPrompt Sanctuary is a Streamlit-based application that leverages AI-powered generative models to create prompts based on user input. It offers two main functionalities: generating text prompts and generating image prompts. Users can either input their custom text or upload an image to generate prompts tailored to their needs. Additionally, there's an option to generate random prompts for both text and image inputs, adding an element of surprise and creativity.\n\n## Installation\n\nTo set up Prompt Sanctuary on your local machine, follow these steps:\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/1999AZZAR/streamlit_promptgen\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd streamlit_promptgen\n   ```\n\n3. Create a virtual env (optional)\n\n    ```bash\n    python -m venv myenv\n    ```\n\n4. Activate the virtual env (if u use one)\n\n   ```bash\n   source myenv/bin/activate\n    ```\n\n5. Navigate to the actual code directory:\n\n   ```bash\n   cd code\n   ```\n\n6. Install the required dependencies from the `requirements.txt` file:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Running the Application\n\nAfter completing the installation steps, you can run the application locally. Execute the following command from the project directory:\n\n```bash\nstreamlit run app.py\n```\n\nThis command will start a local server, and the application will be accessible through your web browser at `http://localhost:8501`.\n\n## Structure of the Code\n\nThe codebase for Prompt Sanctuary is organized as follows:\n\n```text\nstreamlit/\n└── code/\n    ├── img/\n    │   ├── favicon.ico\n    │   └── logo.png\n    ├── instruction/\n    │   ├── examples1.txt\n    │   ├── examples2.txt\n    │   └── image_styles.txt\n    ├── app.py\n    └── generator.py\n```\n\n- `img/`: Directory containing the application's favicon and logo images.\n- `instruction/`: Directory containing text files with instructions or examples.\n- `app.py`: The main Python script containing the Streamlit application code.\n- `generator.py`: Python module implementing the GenerativeModel class for generating prompts.\n\n## Callback Sequence Diagram\n\n```text\nUser            -\u003e   Web Browser           -\u003e   Streamlit Server (app.py)   -\u003e   Generative Model (generator.py)\n|                   |                         |                                |                                 |\n| Input text/image  |                         |                                |                                 |\n|------------------\u003e Request to Server        |                                |                                 |\n|                   |------------------------\u003e|                                |                                 |\n|                   |                         | Process input                  |                                 |\n|                   |                         |-------------------------------\u003e|                                 |\n|                   |                         |                                | Generate prompt                 |\n|                   |                         |                                |\u003c--------------------------------|\n|                   |                         | Return generated prompt        |                                 |\n|                   |\u003c------------------------|                                |                                 |\n|                   | Display prompt          |                                |                                 |\n|\u003c------------------|                         |                                |                                 |\n```\n\n## Credits\n\nPrompt Sanctuary is powered by Streamlit and leverages AI models for prompt generation. Special thanks to the developers of Streamlit and the underlying generative models for enabling this project.\n\n## See on streamlitx\n\n[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://prompt-sanctuary.streamlit.app/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fstreamlit_promptgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fstreamlit_promptgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fstreamlit_promptgen/lists"}