Skip to content
/ ainews Public

Frontend & Backend for generating AI News articles based on current events

License

Notifications You must be signed in to change notification settings

BigOtis/ainews

Repository files navigation

AI News

image

Prerequisites

Before running this application, ensure you have Node.js installed on your system.

Article Generation

The main line code for scraping and then generating news articles with GPT4 is in newsGen.js

Simply setup your API key envars (see below) and then run newsGen.js to generate a news article on demand

Website Installation

Follow these steps to set up the Imaginary Chat Application:

  1. Clone the repository:
git clone https://github.com/BigOtis/ainews.git
cd ainews
  1. Install the dependencies:
npm install
  1. Set up the OpenAI API key:

  2. Create a .env file in the root of the project directory, and add your OpenAI API key and a MongoDB key:

API_KEY_VALUE=your_api_key_here
MONGO_URL=your_mongo_url_credentials

Replace your_api_key_here / your_mongo_url_credentials with your actual OpenAI / MongoDB API key.
Running the application
  1. Start the development server:
npm run server

This command will start the server required for the OpenAI API integration. Keep this terminal window open.

  1. In a new terminal window, start the React development server:
npm start

This command will open the news webpage. The application should be running on http://localhost:3000/.

Now, you can generate an AI perspective on the latest news with the click of a button.

To generate new articles to populate your database, run the newsGen script standalone:

node server/util/newsGen.js

About

Frontend & Backend for generating AI News articles based on current events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published