No project description provided
Project description
Pangram Labs Python Package
Installation
pip install pangram-sdk
Add your API key
Either export it as a variable.
export PANGRAM_API_KEY=<your API key>
Or pass it in to the constructor:
my_api_key = '' # Fill this in with your API key.
classifier = PangramText(api_key=my_api_key)
Make a request
from pangram import PangramText
classifier = PangramText()
result = classifier.predict(text)
# Score in range [0, 1] where 0 is human-written and 1 is AI-generated.
score = result['ai_likelihood']
Make a batch request
from pangram import PangramText
text_batch = ["abc", "def"]
classifier = PangramText()
results = classifier.batch_predict(text_batch)
for result in results:
text = result['text']
score = result['ai_likelihood']
Questions? Email me at max@pangramlabs.com!
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
pangram_sdk-0.1.2.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file pangram_sdk-0.1.2.tar.gz
.
File metadata
- Download URL: pangram_sdk-0.1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3357011823ea196e753eae3310bfe573e706aa0664cd6c46d4ab83421212a660 |
|
MD5 | b236fb49af07395b00201d953c85f13d |
|
BLAKE2b-256 | 1a994ae3ee10703faafef50712019a743641833450b32446c61307d7d688c693 |
File details
Details for the file pangram_sdk-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pangram_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc731a8c5a9d3b107d0617171888181832b81b7672bd06b5e7abe5b8dc1d0f63 |
|
MD5 | ed21c9dca7e0f69ba8bc444abd1510eb |
|
BLAKE2b-256 | 201e808e87e7ea18e84e9d42127b18674edb591134ba6a8afaaa366f8b286a08 |