Giter Site home page Giter Site logo

eternal-security's Introduction

Eternal Security

This project utilizes Express.js and Google's Generative AI to create an image analysis agent. The agent is capable of recognizing differences between two images and describing them. If a person is detected in the images, it provides a description; otherwise, it returns "no intruder."

Installation

  1. Clone the repository:

    git clone <repository-url>
  2. Navigate to the project directory:

    cd eternal-security
  3. Install dependencies:

    npm install
  4. Set up environment variables:

    Create a .env file in the root directory and add your Google Generative AI API key:

    API_KEY=your-api-key
    

Usage

  1. Start the server:

    npm start
  2. Access the application through a web browser or send POST requests to the /api/submit-images endpoint with two images to analyze.

API Endpoints

  • POST /api/submit-images: Uploads two images and analyzes the differences between them.

    • Request Parameters:

      • image1: The first image file.
      • image2: The second image file.
    • Response:

      • Status: 200 OK
      • Body: JSON object with a message describing the differences between the images.

Configuration

  • MODEL_NAME: The name of the generative model to use for text generation.
  • API_KEY: Your Google Generative AI API key. Make sure to set this as an environment variable.

Folder Structure

  • uploads/: Stores uploaded images.
  • public/: Contains static files served by Express.js.
  • README.md: Documentation for the project.
  • app.js: Main application file.
  • package.json: Contains project metadata and dependencies.

Dependencies

  • express: Fast, unopinionated, minimalist web framework for Node.js.
  • multer: Middleware for handling multipart/form-data, used for file uploads.
  • @google/generative-ai: Google's Generative AI package for text generation and conversation modeling.

eternal-security's People

Contributors

alphmalesela avatar

Watchers

 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.