Giter Site home page Giter Site logo

developersdigest / gpt-4-leaflet-next-js Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 7.0 22.28 MB

This project demonstrates the integration of GPT-4 and React-Leaflet to visualize geographic data. The app fetches coordinates and a location title from GPT-4 based on a user query, and then renders them as markers on a Leaflet map.

JavaScript 1.77% TypeScript 92.76% CSS 5.47%

gpt-4-leaflet-next-js's Introduction

GPT-4 and React-Leaflet Map Integration

Demo GIF

This project demonstrates the integration of GPT-4 and React-Leaflet to visualize geographic data. The app fetches coordinates and a location title from GPT-4 based on a user query, and then renders them as markers on a Leaflet map.

Table of Contents

Introduction

The application utilizes GPT-4 for generating coordinates and a title for a location based on the user's request. Once the information is fetched, React-Leaflet is used to mark that location on the map.

Technologies

  • OpenAI SDK
  • Next.js
  • React.js
  • React-Leaflet
  • Node.js

Installation

  1. Clone the repository
git clone https://github.com/developersdigest/GPT-4-LEAFLET-NEXT-JS
  1. Navigate to the project folder and install dependencies
cd your-project-folder
npm install
  1. Add your OpenAI API key to a .env file
OPENAI_API_KEY=your-api-key-here
  1. Start the development server
npm run dev

Usage

  1. Open the application in a browser.
  2. Enter a query in the input field.
  3. Hit "Submit" or press Enter to get the coordinates and title which will be displayed on the map.

Demo Video

You can watch the demo video here.

gpt-4-leaflet-next-js's People

Contributors

jmcwilliam-lifesci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.