Spaces:
Sleeping
Sleeping
File size: 1,815 Bytes
75b0699 dc46def 75b0699 eb5a3ff 75b0699 eb5a3ff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
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.
|