Giter Club home page Giter Club logo

studycopilot's Introduction

Study Copilot

Requirements

  • At least 8GB of RAM
  • At least 12.3GB of free storage (just for the models)

Installation

  1. Install Python 3.12.0 (https://www.python.org/downloads/)

  2. Install ollama (https://ollama.com/download)

  3. Clone this repository

  4. Cd into the StudyCopilot directory

  5. (optional) Get an ngrok account and set up ngrok (https://dashboard.ngrok.com/get-started/setup/)

  6. (optional) Get a free static domain

  7. Install required Python libraries and backages

pip install -r requirements.txt
  1. (optional) Enter your ngrok auth token using this command (replace [AUTH TOKEN] with your actual auth token)
ngrok config add-authtoken [AUTH TOKEN]
  1. Pull the mistral, phi3, llava and nomic-embed-text models
ollama pull mistral
ollama pull phi3
ollama pull llava-llama3
ollama pull nomic-embed-text
  1. Create a Hugging Face account (https://huggingface.co/)

  2. Get gated model access for Mistral (model: mistralai/Mistral-7B-Instruct-v0.2)

  3. Get a Hugging Face User Access Token (https://huggingface.co/settings/tokens)

  4. Get a Google API key and a and a Programmable Search Engine ID (https://developers.google.com/custom-search/v1/overview)

Usage

  1. Configure StudyCopilot if you have not already done so
python3 edit_config.py
  1. (optional) Start a tunnel
ngrok http 11434 --host-header="localhost:11434" --domain=xxxxxxxx.ngrok-free.app
  1. Wait for the client to show something like
HTTP tunnel: https://xxxxxxxx.ngrok-free.app
  1. Open another terminal, then run the client
python3 client/client.py
  1. Wait for the client to show something like
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
  1. Open the local URL on your browser

Features

  1. Flashcard Generator
  2. Study Chatbot

Notes

ngrok

  • You can only make 20000 HTTP/S requests per month and transfer 1 GB out of the server per month with a free account
  • However, unless you are a heavy user of Study Copilot (in that case I applaud you), you are very unlikely to exhaust your free consumption limits

AI

  • Please double-check everything generated by AI; it may generate inaccurate information or information not found in the original input data!

Sources

  1. https://mattmazur.com/2023/12/14/running-mistral-7b-instruct-on-a-macbook/ for the suggestion of using Ollama
  2. https://www.reddit.com/r/Anki/comments/11cgw1j/casting_a_spell_on_chatgpt_let_it_write_anki/ for system prompt of flashcards_helper
  3. https://youtu.be/jENqvjpkwmw?si=n_nOXS_CLallmsfb and https://mer.vin/2024/02/ollama-embedding/ for the UI library suggestion and RAG idea
  4. https://www.youtube.com/watch?v=N8p6u1OtARs and https://github.com/daveshap/latent_space_activation for the LSA prompting system

studycopilot's People

Contributors

dgtv11 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.