Software 3.0
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
softwaress-0.0.1.tar.gz
(54.9 kB
view details)
Built Distribution
File details
Details for the file softwaress-0.0.1.tar.gz
.
File metadata
- Download URL: softwaress-0.0.1.tar.gz
- Upload date:
- Size: 54.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71faced804c225fb5030eb75162bc3bbd557c502158b5a21e1660d394f3efdbb |
|
MD5 | c886503d6e40c8425547f518b30167d1 |
|
BLAKE2b-256 | 934df588dab84c791fd4e58953859019b253a476bbb1f538dae39b627445a109 |
File details
Details for the file softwaress-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: softwaress-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 75.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7010ed2b33b960abc45f62015727e9b33dad6e4ab5fe12d3447bebdd760cc5f |
|
MD5 | c065b504d82bc7f71edebdf7dba57d82 |
|
BLAKE2b-256 | 1cd8f136f12fda870e833c9b5fd2024828e09e1943994f053ea480154afb4e2c |