Coder Social home page Coder Social logo

rados10 / llm_text_analyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdrx/llm_text_analyzer

0.0 0.0 0.0 19 KB

Summarize/analyze large amounts of text using local LLM models, langchain, ollama, and flask. No data leaves your computer.

License: Creative Commons Zero v1.0 Universal

Python 35.38% CSS 18.21% HTML 46.41%

llm_text_analyzer's Introduction

text_summarizer

summarize large amounts of text using langchain, ollama and flask. Spins out a local server using flask, works offline, no data leaves the computer.

How to set up

  • Fork or clone this repository

  • Install Ollama for easy interaction with LLMs (brew install ollama), follow instructions to spin up the ollama service (brew services start ollama)

  • Download llm models, e.g.:

    • ollama pull dolphin-llama3
    • ollama pull llama3

    Feel free to add and try out other models. For more info on models, visit ollama library

  • recommended: create new environment with venv or VScode

  • navigate to the local folder of the repo

  • install project dependencies (pip install -r requirements.txt)

How to use

  • navigate to repo local folder, enter your venv environment if set up
  • run python app.py
    • Open the link in your browser
  • provide context to work from - either copy/paste or open a file (which will populate the input window)
  • Select model to use - dropdown will list those that are available in ollama.
  • you can pick from predefined system prompts and questions, or you can edit it. It is crucial to include {context} and {input} in the system prompt, as otherwise the model won't know what data to base the answer on, and what the question is
  • Submit and... patience! Time depends hugely on your system performance and on size of the text
  • You'll get the generated response and the request metadata in a page

llm_text_analyzer's People

Contributors

mdrx avatar marek-dravecky 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.