Skip to main content

Classy

How to use

Install:

pip install Classy-AI

Setup: Only do this if you plan to run the model locally

import Classy
Classy.download()

Downloads "data.pth" to your working directory.

Usage (Complete version for a server):

import Classy
Classy.init('/path/to/data.pth','OpenAI api key')
primary, secondary, stemmed, organized = Classy.server("hello, how are you?")

Usage (Just the classifier)

import Classy
intent, certainty = Classy.classify("hello, how are you?",'/path/to/data.pth')

API

Usage

import Classy
intent, certainty = Classy.classify_api("hello, how are you?")

Go to http://app.chat314.com/api to learn about how to use the api yourself.

Other tools

GPT:

Classy.chat_gpt(input,model,api_key)
DALL-E:
Classy.dall_e(input,model,size,api_key)
Search:
Classy.search(input,model,api_key)
Personal:
Classy.personal(input)

Example:

import Classy
api_key='sk-proj-api-key'
while True:
    var=input(': ')
    output,prob= Classy.classify_api(var)
    final=''
    secondary=''
    if output == 'GPT' and prob >= 0.7:
        final=Classy.chat_gpt(var,"gpt-4o-mini",api_key)
    elif output == 'Dall-e' and prob >= 0.7:
        final=Classy.dall_e(var,"dall-e-3","1024x1024",api_key)
    elif output == 'Search' and prob >= 0.7:
        final=Classy.search(var,"gpt-4o-mini",api_key)
    elif output == 'Personal' and prob >= 0.7:
        final,secondary,x,y=Classy.personal(var)
    print(final)
    if secondary:
        print(secondary)

I need more training data

Open a pull request if you have some and put it in unorganized data. I will format it. If you have organized data, put it directly in the intents.json file.

An easy way to contribute is by scrolling through your ChatGPT conversations/Google searches/DALL-E inputs and pasting some of your own data into the unformatted data file.

Deployed here:

https://chat314.com

Uses models gpt-4o-mini and dall-e-3.

I can add a custom password for you on the website if you add training data. Message me at 123scoring@gmail.com. Put in the description of the pull request that you want a custom password for your Openai key.

Thanks

Thanks to Patrick Loeber for teaching me PyTorch

Metadata

Release files for classy-ai 0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for classy-ai 0.0.18
File Size Uploaded
classy_ai-0.0.18.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for classy-ai 0.0.18
File Interpreter ABI Platform
classy_ai-0.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / classy_ai-0.0.18.tar.gz

Download URL classy_ai-0.0.18.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
081fa6cf8ad8375153d3c9dfd75e0e498f45e02a4ef57d66133870f0d200be87
BLAKE2b-256 checksum
How to use checksums
90715f7d02220e06483160cf6d366d33065411d98e9bec2ac7069c417d997c0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / classy_ai-0.0.18-py3-none-any.whl

Download URL classy_ai-0.0.18-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afcc565343fd3cd0d50ba689b76ef6f8d30b1233456fa14de4f7d34e71deca53
BLAKE2b-256 checksum
How to use checksums
fecdc271e246cec15f85aca117ec90a14b40126264adb29bd9b31b55c2ee851b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.18 This release

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page