holboxai


Nameholboxai JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/springtownAdmin/holboxai
SummaryHolboxAI package
upload_time2024-04-11 13:33:27
maintainerNone
docs_urlNone
authorSahil Khatri
requires_pythonNone
licenseMIT
keywords genai custom holbox
VCS
bugtrack_url
requirements boto3 langchain langchain_community unstructured unstructured pandasai langchainhub faiss-cpu
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HolboxAI Package
Welcome to HolboxAI, a comprehensive AI package designed to enhance your data processing and creative capabilities. HolboxAI offers a range of functionalities including text-to-image generation, running textual queries on documents stored in your S3 bucket, and generating insights from natural language queries. This README provides a detailed guide on how to install and use the various features of HolboxAI.

### **Installation**

To get started with HolboxAI, you need to install the package. Run the following command in your terminal:
```sh
pip install holboxai
```

After installation, you can import HolboxAI into your project using:
```sh
import holboxai as hb
```
## Features
### 1. RAG 
To run textual queries on your S3 bucket documents, follow these steps:
Load Documents from S3 Bucket:
First, import the S3DocReader class and initialize it. Then, call the get_bucket() method and provide the name of your S3 bucket as its argument.
```sh
## To Select the documents from entire s3 bucket
reader = hb.S3DocReader()
documents = reader.get_docs(bucket="<bucket_name>")

## To select a specific document
doc_file = reader.get_file(bucket="<bucket_name>",file_name="file_name")
```
- **Index Documents and Generate Response:**

    Next, import the DocsQuery class. Use createindexes() to index the documents and query() to generate the response for your prompted query.
    ```sh
    docsQuery = hb.DocsQuery()
    indexes = docsQuery.create_index(documents)
    query = " "  # Your query here
    response = docsQuery.query(indexes, query)
    ```
- **Validate Sources:**

    To validate the sources that generated the response of your query, import RelevantDocs and call get_docs(). This will show all the documents from which the response is created.
    ```sh
    rel_docs = hb.RelevantDocs()
    docs = rel_docs.get_docs(query=query, n_docs=4, retriever=indexes)
    ```

### 2. Generating Insights from CSV Files
This feature will help User to get insight from .csv file using natural language.

- For insight on single csv file
    ```sh
    import pandas as pd

    csv_insight = hb.CsvQuery()
    query = "your query"
    df = pd.read_csv("<csv_file_path>")
    response = csv_insight.single_csv_query(df , query)
    print(response)
    ```
- For insight on multiple csv files
    ```sh
    import pandas as pd

    csv_insight = hb.CsvQuery()
    query = "your query"
    df1 = pd.read_csv("<csv_file1_path>")
    df2 = pd.read_csv("<csv_file2_path>")
    dfs = [df1,df2]
    response = csv_insight.multi_csv_query(dfs , query)
    print(response)
    ```

### 3. Generating Images from Text Prompts
To generate images based on your text prompts, use the text2image module. The generate_image() method's arguments include your desired prompt, guidance scale, and inference steps.


```sh
txt2img = hb.text2image()
prompt = "a sports car, on a racing track,4K" # Change the prompt according to requirement
txt2img.generate_image(prompt=prompt,cfg_scale=5, infernce_steps=25) 
```

- **cfg_scale** = Guidance scale is a parameter that controls how much the image generation 
            process follows the text prompt. The higher the value, the more the image
            sticks to a given text input and vice-versa. It ranges from (1-20)
             
- **inference_steps** = Inference steps controls how many steps will be taken during this process. 
                  The higher the value, the more steps that are taken to produce the image.
                  It ranges from (5-100) 


### 4. Getting Summary of the documents from S3 bucket
This feature will summarize the selected document from the s3 bucket for user.
```sh
reader = hb.S3DocReader()
docs = reader.get_file(bucket_name="<Bucket Name>",file_name = "<File Name>")
doc_summary = hb.Summarizer()
summary = doc_summary.summarize(docs)
print(summary)
```

### 5. Getting Sentiment of a text/sentence
This feature will help user to get the sentiment of the text/sentence
(Positive/Negative).

Supported Foundation models
1. Anthropic  Claude
2. Amazon Titan
3. Cohere (Default)
```sh
sa = hb.SentimentAnalysis()
response = sa.get_sentiment(text="<text>")
print(response)
```

```sh

sa = hb.SentimentAnalysis()
response = sa.get_sentiment( text="<text>", model="Amazon Titan")
print(response)
```
### 6. Getting name and entity from a text/sentence
This feature will help user to extract important keywords (Name,place) from the given sentence.

Supported Foundation models
1. Anthropic  Claude
2. Amazon Titan
3. Cohere (Default)
```sh

ner = hb.NameEntityRecognition()
response = ner.get_entity(text="<text>")
print(response)
```

```sh

ner = hb.NameEntityRecognition()
response = ner.get_entity(text="<text>", model = "Anthropic Claude")
print(response)
```
### 7. Meeting Summarizer
This feature will allow user to get things like sentiment, sentiment score, Action Items, summary of each topic discussed and the total time, each individual had spoken in the meeting.
Supported File Format: vtt and txt.
The structure of the content inside the file must be mantained, refer demo meeting_summary.txt file in demoFiles folder. 
```sh
ms = hb.MeetingSummarizer()
response = ms.get_meeting_summary("<bucket_name>", "<file_name>")
print(response)
```
## Conclusion
HolboxAI is designed to simplify complex AI functionalities and make them accessible for various applications. Whether you're querying documents, generating creative images, or seeking insights from data, HolboxAI provides the tools you need. Enjoy exploring the capabilities of HolboxAI in your projects!



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/springtownAdmin/holboxai",
    "name": "holboxai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "GenAI, Custom, holbox",
    "author": "Sahil Khatri",
    "author_email": "sahil.khatri@holbox.ai",
    "download_url": "https://files.pythonhosted.org/packages/8d/2f/5913d4e7ad5378fbe80a0c5f1ef0a43782e4e103a1964b8aee4c98e0f1d2/holboxai-0.12.tar.gz",
    "platform": null,
    "description": "# HolboxAI Package\nWelcome to HolboxAI, a comprehensive AI package designed to enhance your data processing and creative capabilities. HolboxAI offers a range of functionalities including text-to-image generation, running textual queries on documents stored in your S3 bucket, and generating insights from natural language queries. This README provides a detailed guide on how to install and use the various features of HolboxAI.\n\n### **Installation**\n\nTo get started with HolboxAI, you need to install the package. Run the following command in your terminal:\n```sh\npip install holboxai\n```\n\nAfter installation, you can import HolboxAI into your project using:\n```sh\nimport holboxai as hb\n```\n## Features\n### 1. RAG \nTo run textual queries on your S3 bucket documents, follow these steps:\nLoad Documents from S3 Bucket:\nFirst, import the S3DocReader class and initialize it. Then, call the get_bucket() method and provide the name of your S3 bucket as its argument.\n```sh\n## To Select the documents from entire s3 bucket\nreader = hb.S3DocReader()\ndocuments = reader.get_docs(bucket=\"<bucket_name>\")\n\n## To select a specific document\ndoc_file = reader.get_file(bucket=\"<bucket_name>\",file_name=\"file_name\")\n```\n- **Index Documents and Generate Response:**\n\n    Next, import the DocsQuery class. Use createindexes() to index the documents and query() to generate the response for your prompted query.\n    ```sh\n    docsQuery = hb.DocsQuery()\n    indexes = docsQuery.create_index(documents)\n    query = \" \"  # Your query here\n    response = docsQuery.query(indexes, query)\n    ```\n- **Validate Sources:**\n\n    To validate the sources that generated the response of your query, import RelevantDocs and call get_docs(). This will show all the documents from which the response is created.\n    ```sh\n    rel_docs = hb.RelevantDocs()\n    docs = rel_docs.get_docs(query=query, n_docs=4, retriever=indexes)\n    ```\n\n### 2. Generating Insights from CSV Files\nThis feature will help User to get insight from .csv file using natural language.\n\n- For insight on single csv file\n    ```sh\n    import pandas as pd\n\n    csv_insight = hb.CsvQuery()\n    query = \"your query\"\n    df = pd.read_csv(\"<csv_file_path>\")\n    response = csv_insight.single_csv_query(df , query)\n    print(response)\n    ```\n- For insight on multiple csv files\n    ```sh\n    import pandas as pd\n\n    csv_insight = hb.CsvQuery()\n    query = \"your query\"\n    df1 = pd.read_csv(\"<csv_file1_path>\")\n    df2 = pd.read_csv(\"<csv_file2_path>\")\n    dfs = [df1,df2]\n    response = csv_insight.multi_csv_query(dfs , query)\n    print(response)\n    ```\n\n### 3. Generating Images from Text Prompts\nTo generate images based on your text prompts, use the text2image module. The generate_image() method's arguments include your desired prompt, guidance scale, and inference steps.\n\n\n```sh\ntxt2img = hb.text2image()\nprompt = \"a sports car, on a racing track,4K\" # Change the prompt according to requirement\ntxt2img.generate_image(prompt=prompt,cfg_scale=5, infernce_steps=25) \n```\n\n- **cfg_scale** = Guidance scale is a parameter that controls how much the image generation \n            process follows the text prompt. The higher the value, the more the image\n            sticks to a given text input and vice-versa. It ranges from (1-20)\n             \n- **inference_steps** = Inference steps controls how many steps will be taken during this process. \n                  The higher the value, the more steps that are taken to produce the image.\n                  It ranges from (5-100) \n\n\n### 4. Getting Summary of the documents from S3 bucket\nThis feature will summarize the selected document from the s3 bucket for user.\n```sh\nreader = hb.S3DocReader()\ndocs = reader.get_file(bucket_name=\"<Bucket Name>\",file_name = \"<File Name>\")\ndoc_summary = hb.Summarizer()\nsummary = doc_summary.summarize(docs)\nprint(summary)\n```\n\n### 5. Getting Sentiment of a text/sentence\nThis feature will help user to get the sentiment of the text/sentence\n(Positive/Negative).\n\nSupported Foundation models\n1. Anthropic  Claude\n2. Amazon Titan\n3. Cohere (Default)\n```sh\nsa = hb.SentimentAnalysis()\nresponse = sa.get_sentiment(text=\"<text>\")\nprint(response)\n```\n\n```sh\n\nsa = hb.SentimentAnalysis()\nresponse = sa.get_sentiment( text=\"<text>\", model=\"Amazon Titan\")\nprint(response)\n```\n### 6. Getting name and entity from a text/sentence\nThis feature will help user to extract important keywords (Name,place) from the given sentence.\n\nSupported Foundation models\n1. Anthropic  Claude\n2. Amazon Titan\n3. Cohere (Default)\n```sh\n\nner = hb.NameEntityRecognition()\nresponse = ner.get_entity(text=\"<text>\")\nprint(response)\n```\n\n```sh\n\nner = hb.NameEntityRecognition()\nresponse = ner.get_entity(text=\"<text>\", model = \"Anthropic Claude\")\nprint(response)\n```\n### 7. Meeting Summarizer\nThis feature will allow user to get things like sentiment, sentiment score, Action Items, summary of each topic discussed and the total time, each individual had spoken in the meeting.\nSupported File Format: vtt and txt.\nThe structure of the content inside the file must be mantained, refer demo meeting_summary.txt file in demoFiles folder. \n```sh\nms = hb.MeetingSummarizer()\nresponse = ms.get_meeting_summary(\"<bucket_name>\", \"<file_name>\")\nprint(response)\n```\n## Conclusion\nHolboxAI is designed to simplify complex AI functionalities and make them accessible for various applications. Whether you're querying documents, generating creative images, or seeking insights from data, HolboxAI provides the tools you need. Enjoy exploring the capabilities of HolboxAI in your projects!\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "HolboxAI package",
    "version": "0.12",
    "project_urls": {
        "Download": "https://github.com/springtownAdmin/holboxai/archive/refs/tags/v_13.tar.gz",
        "Homepage": "https://github.com/springtownAdmin/holboxai"
    },
    "split_keywords": [
        "genai",
        " custom",
        " holbox"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d2f5913d4e7ad5378fbe80a0c5f1ef0a43782e4e103a1964b8aee4c98e0f1d2",
                "md5": "88c2174b903f7fefdc23510fe2d38d63",
                "sha256": "d9ddc3f29f82e6ffe2f738db1efa891cced72eb974618e5124ed1ba3673f8ce0"
            },
            "downloads": -1,
            "filename": "holboxai-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "88c2174b903f7fefdc23510fe2d38d63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16751,
            "upload_time": "2024-04-11T13:33:27",
            "upload_time_iso_8601": "2024-04-11T13:33:27.582881Z",
            "url": "https://files.pythonhosted.org/packages/8d/2f/5913d4e7ad5378fbe80a0c5f1ef0a43782e4e103a1964b8aee4c98e0f1d2/holboxai-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-11 13:33:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "springtownAdmin",
    "github_project": "holboxai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "boto3",
            "specs": []
        },
        {
            "name": "langchain",
            "specs": []
        },
        {
            "name": "langchain_community",
            "specs": []
        },
        {
            "name": "unstructured",
            "specs": []
        },
        {
            "name": "unstructured",
            "specs": []
        },
        {
            "name": "pandasai",
            "specs": []
        },
        {
            "name": "langchainhub",
            "specs": []
        },
        {
            "name": "faiss-cpu",
            "specs": []
        }
    ],
    "lcname": "holboxai"
}
        
Elapsed time: 0.22189s