Skip to main content

Talk to your CSV data with your huggingface llm models

Project description

Language Model Analyst

The Language Model Analyst is a Python package and Streamlit app that enables natural language generation and analysis using HuggingFace-based language models (LLMs) and OpenAI GPT-3. This package and app are designed to simplify and streamline interactions with these powerful language models.

Usage

Package: LLMAnalyst

The LLMAnalyst class allows you to interact with HuggingFace-based language models. Follow these steps to use the package:

  1. Install the package:

    pip install git+https://github.com/eersnington/LLMAnalyst.git
    
    # For using GPTQ models
    pip install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/  
    
  2. Import and create an instance of LLMAnalyst:

    from LLMAnalyst import LLMAnalyst
    llm_analyst = LLMAnalyst("TheBloke/CodeLlama-13B-Instruct-GPTQ")
    
  3. query = "How many number of rows are there?"
    df = pd.read_csv("data.csv")
    result = llm_analyst.conversational_chat(query, df)
    

The OpenAIGPTAnalyst class enables interaction with the OpenAI GPT-3 model. Follow these steps to use the package:

  1. Import and create an instance of OpenAIGPTAnalyst:

    from LLMAnalyst import OpenAIGPTAnalyst
    
    openai_analyst = OpenAIGPTAnalyst(
        api_key='YOUR_OPENAI_API_KEY'
    )
    
  2. Communicate with GPT-3:

    query = "Calculate the mean of monthly sold data."
    df = pd.read_csv("data.csv")
    result = openai_analyst.conversational_chat(query, your_dataframe)
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmanalyst-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llmanalyst-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file llmanalyst-0.0.1.tar.gz.

File metadata

  • Download URL: llmanalyst-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for llmanalyst-0.0.1.tar.gz
Algorithm Hash digest
SHA256 586a4aba597e89151cc9bddb2cb264b3077998b1cddcc38cf4c2f05b8d610a3b
MD5 e1ee1a9128aaeb333a3e7904bb75695c
BLAKE2b-256 5755248cec80b0969237cb01fa9f66f283015b0cb4a0a3fc416d5a4998b9a5cf

See more details on using hashes here.

File details

Details for the file llmanalyst-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: llmanalyst-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for llmanalyst-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f48cc9469ba0ca95b8d3039aee029cb6ab971b8c80f387ff2272c260a75c5bcb
MD5 da6091ca0baae8a758a14b6492dc855c
BLAKE2b-256 8a6e65879c3a75a8ee983381c6158ad8f4757469f622473b3afc53fe6387788d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page