Software 3.0 - Promptware
Install
For common users
pip install softwares
For developers
https://github.com/ExpressAI/softwares.git
cd softwares
# Install the required dependencies and dev dependencies
pip install -e .
Quick Example
export OS_API_KEY=YOUR_OPENAI_KEY
from softwares import load
software = load("sentiment_classifier")
label = software.execute({"text": "I love this movie"})
or load a software locally
from softwares import load
software = load("./hub/sentiment_classifier")
label = software.execute({"text": "I love this movie"})
it also supports subconfig:
from softwares import load
software = load("./hub/machine_translation", "enzh")
software = load("./hub/machine_translation", "zhen")
See more in this example
Add More Softwares
Here is one example, where you need to create two files:
sentiment_classifier: declare different configs of the softwaresentiment_classifier_test: a test file for your defined software
you can run the test file with following script:
python -m unittest hub.sentiment_classifier.sentiment_classifier_test
Schema of Promptware
@dataclass
class Promptware:
# Name
name: str
# Describe what the promptware is designed for
description: str
# Instruction text of promptware
instruction: str | Callable[[Any], str]
# Demonstration of promptware
demonstration: Optional[list[str]]
# Prompt template defines how a user's input will be formatted
prompt_template: Callable[[Any], str]
# The most appropriate tasks that the promptware could be applied to
task: TaskType
Metadata
Release files for softwaress 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| softwaress-0.0.1.tar.gz | 54.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| softwaress-0.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 130.6 kB
Release files / softwaress-0.0.1.tar.gz
| Download URL | softwaress-0.0.1.tar.gz |
|---|---|
| Size | 54.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71faced804c225fb5030eb75162bc3bbd557c502158b5a21e1660d394f3efdbb
|
|
BLAKE2b-256 checksum How to use checksums |
934df588dab84c791fd4e58953859019b253a476bbb1f538dae39b627445a109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / softwaress-0.0.1-py2.py3-none-any.whl
| Download URL | softwaress-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 75.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d7010ed2b33b960abc45f62015727e9b33dad6e4ab5fe12d3447bebdd760cc5f
|
|
BLAKE2b-256 checksum How to use checksums |
1cd8f136f12fda870e833c9b5fd2024828e09e1943994f053ea480154afb4e2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|