Playing With GPT is a playful yet secure project that interacts with OpenAI's GPT-4 API. The project is built using Python, JavaScript, HTML, and CSS, providing a simple and cohesive interface for generating text based on user input.
playingWithGPT/
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ └── utils.py
├── frontend/
│ ├── index.html
│ ├── styles
│ └── styles.css
│ ├── scripts
│ └── script.js
├── .gitignore
└── README.md
- Backend: Powered by Flask, it handles API requests and communicates with the GPT-4 API.
- Frontend: A simple HTML/CSS/JS interface for users to input prompts and display generated text.
- Security: Adheres to security standards, including the use of environment variables for sensitive information.
- Python 3.8+
- Node.js (for potential future enhancements)
- OpenAI API Key
-
Clone the repository
git clone https://github.com/ruizTechServices/playingWithGPT.git cd playingWithGPT
-
Set up the backend
cd backend python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Create a
.env
file in the backend directoryecho "OPENAI_API_KEY=your-openai-api-key" > .env
-
Run the Flask application
python app.py
-
Open the frontend
- Open
index.html
in your browser.
- Open
-
Navigate to the frontend directory:
cd frontend
-
Open
index.html
in your browser. -
Enter a prompt in the textarea and click "Generate" to receive a response from GPT-4.
Contributions are welcome! Please fork the repository and submit a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Luis Giovanni Ruiz - @your_twitter_handle - [email protected]
Project Link: [https://github.com/ruizTechServices/playingWithGPT.git]