Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cynthiawahome/js-poetic-phrase-generator
This project leverages OpenAI and Unsplash APIs to generate a poetic phrase and showcase a background image. It crafts witty and imaginative poetry about your favorite activities or places, and pairs it with stunning visuals for a delightful and engaging experience.
https://github.com/cynthiawahome/js-poetic-phrase-generator
javascript openai unsplash-api
Last synced: 10 days ago
JSON representation
This project leverages OpenAI and Unsplash APIs to generate a poetic phrase and showcase a background image. It crafts witty and imaginative poetry about your favorite activities or places, and pairs it with stunning visuals for a delightful and engaging experience.
- Host: GitHub
- URL: https://github.com/cynthiawahome/js-poetic-phrase-generator
- Owner: CynthiaWahome
- Created: 2024-09-14T09:08:24.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T09:24:09.000Z (2 months ago)
- Last Synced: 2024-09-14T20:09:36.704Z (2 months ago)
- Topics: javascript, openai, unsplash-api
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poetic Phrase & Background Generator
## Overview
The **Poetic Phrase & Background Generator** is a web application designed to produce imaginative and engaging poetic phrases about your favorite activities and destinations. By utilizing OpenAI and Unsplash APIs, the application combines witty, satirical poetry with beautiful, relevant background images.
## Features
- **AI-Generated Poetry**: Leverages OpenAI's GPT model to generate creative and humorous poetic phrases.
- **High-Quality Imagery**: Integrates with the Unsplash API to provide visually appealing background images.
- **Interactive Experience**: Customize the input to generate phrases and images based on your preferences.## Technologies
- **JavaScript**: Core scripting language for application logic.
- **OpenAI API**: For generating poetic content.
- **Unsplash API**: For fetching high-resolution images.## Getting Started
To set up and run the Poetic Phrase & Background Image Generator locally, follow these steps:
### Prerequisites
Make sure you have the following installed:
- [Node.js](https://nodejs.org/) (includes npm)### Installation
1. **Clone the Repository**
```bash
git clone https://github.com/yourusername/poetic-phrase-background-generator.git
cd poetic-phrase-background-generator
```2. **Install Dependencies**
```bash
npm install
```3. **Configure API Keys**
Create a `.env` file in the root directory of the project and add your API keys:
```plaintext
OPENAI_API_KEY=your_openai_api_key
UNSPLASH_ACCESS_KEY=your_unsplash_access_key
```4. **Run the Application**
Start the application with:
```bash
npm start
```Navigate to `http://localhost:3000` in your browser to view the application.
## Usage
1. **Input**: Enter your favorite activity or place in the provided field.
2. **Generate Content**: Click the generate button to receive a poetic phrase and a corresponding background image.
3. **Refresh**: Use the refresh button to generate new content.## API Keys
To use the application, you need API keys from OpenAI and Unsplash:
- **OpenAI API Key**: Sign up at [OpenAI](https://beta.openai.com/signup/) to obtain your key.
- **Unsplash Access Key**: Register at [Unsplash Developers](https://unsplash.com/developers) to get your access key.## License
This project is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.