Spaces:
Sleeping
Sleeping
| title: Task Prompting | |
| emoji: ๐ | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 6.11.0 | |
| app_file: app.py | |
| pinned: false | |
| # Task Prompting Tool | |
| A tool designed for project managers and team leaders to generate developer-ready prompts. By providing a task description, specifying a field (e.g., Backend, Frontend), and uploading relevant context files, the underlying LLM (OpenAI or Google Gemini) will construct a comprehensive prompt ready to be handed to developers. | |
| ## Prerequisites | |
| - Python 3.8+ | |
| - API keys for OpenAI and/or Google Gen AI. | |
| ## Setup Instructions | |
| **1. Create Hand-configured Keys in `.env`** | |
| Edit the `.env` file and insert your API keys and models as preferred: | |
| ```env | |
| OPENAI_API_KEY="your-openai-api-key" | |
| GOOGLE_API_KEY="your-google-api-key" | |
| LLM_PROVIDER="google" # Options: "google" or "openai" | |
| OPENAI_MODEL="gpt-4.1-mini" | |
| GOOGLE_MODEL="gemini-3.1-flash-lite-preview" | |
| ``` | |
| **2. Setup Virtual Environment & Install Dependencies** | |
| Open a terminal and run the following commands in the project directory: | |
| ```bash | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install -r requirements.txt | |
| ``` | |
| ## Running the Application | |
| ### Method 1: Using the UI (Recommended) | |
| You can directly run the Gradio application to access the user interface. | |
| ```bash | |
| source venv/bin/activate | |
| python app.py | |
| ``` | |
| After executing, an interface will open at `http://127.0.0.1:7860/` by default. You can open your browser to this URL to interact with the Task Prompting Tool. | |
| ### Method 2: Running the API Server | |
| If you'd like to integrate this logic into another system or frontend, run the FastAPI backend: | |
| ```bash | |
| source venv/bin/activate | |
| python api.py | |
| ``` | |
| The server will run at `http://0.0.0.0:8000`. | |
| - View API Documentation at `http://127.0.0.1:8000/docs` to test endpoints interactively. | |