This repository contains the code for the Shayari Generation web application. The application allows users to generate Shayari. It consists of both frontend and backend components.
- Node.js (v12 or higher)
-
Clone the repository:
git clone https://github.com/Asimji/Shayari_Generator.git cd shayari-generation -
Install dependencies for both frontend and backend:
cd frontend npm install cd ../backend npm install -
Set up environment variables for the backend:
Create a
.envfile in thebackendfolder and provide your OpenAI API key:OPENAI_API_KEY=your_openai_api_key_here PORT=8000Replace
your_openai_api_key_herewith your actual OpenAI API key. -
Start the frontend development server:
cd frontend npm startThe frontend will run on
https://ai-content-generation.vercel.app/. -
Start the backend server:
cd backend npm startThe backend will run on
http://localhost:8000.
The frontend is built using React.js and Chakra UI for the user interface. It communicates with the backend API to generate content based on user-provided keywords.
The backend is built using Express.js and interacts with the OpenAI API to generate Shayari, Jokes, Stories, and Quotes based on user-provided keywords.
The web application is deployed at: https://ai-content-generation.vercel.app/
- react: JavaScript library for building user interfaces
- react-dom: Integration of React with the DOM
- fetch: Promise-based HTTP client for making API requests
- @chakra-ui/react: UI component library for React
- framer-motion: Library for animations in React
- express: Web framework for Node.js
- dotenv: Load environment variables from
.envfile - cors: Enable Cross-Origin Resource Sharing (CORS)
- openai: Official OpenAI GPT-3 API library
-
The application allows users to generate Shayary.
-
Enter a keyword in the "Enter Text" input field.
-
Select the type of content you want to generate from the dropdown menu.
-
Click on the "Generate" button.
-
The generated content will be displayed below the button.
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE for details.
.png)