A web application that enhances prompts using the Mistral AI API.
- Python 3.9 or higher
- Mistral AI API key (get it from Mistral AI Platform)
- Clone the repository:
git clone <repository-url>
cd PromptAI- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
cd backend
pip install -r requirements.txt- Configure API key:
- Create a
.envfile in the project root - Add your Mistral API key:
MISTRAL_API_KEY=your_api_key_here
- Create a
- Start the backend server:
cd backend
python -m uvicorn main:app --host 0.0.0.0 --port 8000- In a new terminal, serve the frontend:
cd frontend
python -m http.server 80- Access the application:
- Open your web browser and navigate to
http://localhost - The backend API will be available at
http://localhost:8000
- Open your web browser and navigate to
- Enter your original prompt in the text area
- Click the "Enhance Prompt" button
- Wait for the enhanced version to appear
Run tests:
cd backend
pytest-
If you see API errors:
- Verify your Mistral API key in
.env - Check if the backend server is running
- Look for error messages in the browser console
- Verify your Mistral API key in
-
If the frontend doesn't load:
- Ensure port 80 is available
- Try using a different port (e.g.,
python -m http.server 8080)
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License