Giter Club home page Giter Club logo

vision-core-ai's Introduction

Vision Core AI

Demo python script app to interact with llama.cpp server using whisper API, microphone and webcam devices.

Step 1: Install Llama C++ and package dependencies on your machine

Clone the Llama C++ repository from GitHub:

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp

On macOS:

Build with make:

make

Or, if you prefer cmake:

cmake --build . --config Release

macOS requirements

you need to install these dependencies in your computer: ffmpeg and portaudio

brew install ffmpeg portaudio

Also be sure to provide permissions to the terminal in the Security & Privacy > Privacy options

Step 2: Download the Model!

  1. Download from Hugging Face - mys/ggml_bakllava-1 this 2 files:
  • ggml-model-q4_k.gguf (or any other quantized model) - only one is required!
  • mmproj-model-f16.gguf
  1. Copy the paths of those 2 files.

  2. Run this in the llama.cpp repository (replace YOUR_PATH with the paths to the files you downloaded):

    macOS

    ./server -m YOUR_PATH/ggml-model-q4_k.gguf --mmproj YOUR_PATH/mmproj-model-f16.gguf -ngl 1
    

    Windows

    server.exe -m REPLACE_WITH_YOUR_PATH\ggml-model-q4_k.gguf --mmproj REPLACE_WITH_YOUR_PATH\mmproj-model-f16.gguf -ngl 1
    
    
  3. The llama server is now up and running!

    โš ๏ธ NOTE: Keep the server running in the background.

  4. Let's run the script to use the webcam and microphone

Step 3: Running the Demo

Open a new terminal window and clone the demo app:

git clone https://github.com/herrera-luis/vision-core-ai.git
cd vision-core-ai

Install python dependencies

pip install -r requirements.txt

Run the main script

python main.py

How to interact with the app

When the application is running you need to press the keys i or c to enable the recording and a second time the same key to stop it

  • i will use your webcam
  • c will use chat

Related project:

vision-core-ai's People

Contributors

herrera-luis avatar

Stargazers

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

Watchers

 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.