Skip to main content

This package is meant to offer a variety of convenient inference functions, particularly for fine-tuned transformers.

Limited to Jochen Hartmann's fine-tuned j-hartmann/emotion-english-distilroberta-base for now.

Install:
  1. Command line pip install ezpredict
  2. Google Colab !pip install ezpredict
Imports:
pip install numpy
pip install torch
pip install transformers
How to use:
from ezpredict import predict

preds = predict.predict_input(model_name="j-hartmann/emotion-english-distilroberta-base",
                             input=["What a beautiful day!"],
                              return_values=True,
                              print_values=True)
Variables:
  1. model_name -> name of model to perform inference on (limited to Jochen Hartmann's fine-tuned j-hartmann/emotion-english-distilroberta-base for now)
  2. input -> list of strings to perform predictions on
  3. return_values -> True/False, True: returns predictions as list of tuples
  4. print_values -> True/False, True: returns verbose outputs
Sample output:
[('What a beautiful day!', {'anger': 0.0013013791, 'disgust': 0.00047031444, 'fear': 0.001256481, 'joy': 0.95772415, 'neutral': 0.005870249, 'sadness': 0.004233605, 'surprise': 0.029143812}), ('My grandfather died today.', {'anger': 0.0012322478, 'disgust': 0.002399753, 'fear': 0.0018630251, 'joy': 0.0021994421, 'neutral': 0.012114782, 'sadness': 0.96717805, 'surprise': 0.013012686})]

Release files for ezpredict 0.0.6

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

Source distribution (sdist)

Source distribution for ezpredict 0.0.6
File Size Uploaded
ezpredict-0.0.6.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ezpredict 0.0.6
File Interpreter ABI Platform
ezpredict-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size:7.8 kB

Release files / ezpredict-0.0.6.tar.gz

Download URL ezpredict-0.0.6.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7fdacd2acd7fc064f15f2ceb31a5ea68e277eb3f8be7bea20da438d39bf62de7
BLAKE2b-256 checksum
How to use checksums
4836c9270eb29f45911ab0578862a4c162479d46ab4779b60d2d4bbd492ef6a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.2

Release files / ezpredict-0.0.6-py3-none-any.whl

Download URL ezpredict-0.0.6-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1681efeb706fc020aa0fece5e92a194fc5a125d4ea14b5e4358175912039de9
BLAKE2b-256 checksum
How to use checksums
edc16449f78065b17d2aec9ec97caf875b4e6d8b889d0d2279fbc7a7854c1823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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