Update demos
This commit is contained in:
parent
7a71510cca
commit
b9daa7bc4c
7 changed files with 21 additions and 17 deletions
14
README.md
14
README.md
|
|
@ -10,29 +10,29 @@
|
|||
|
||||
Applying AI is becoming increasingly easier but many case studies have shown that these applications are often deployed poorly. This may lead to suboptimal performance and to introducing unintended biases. GreatAI helps fixing this by allowing you to easily transform your prototype AI code into production-ready software.
|
||||
|
||||
[Check out the full documentation here](https://great-ai.scoutinscience.com).
|
||||
|
||||
## Example
|
||||
|
||||
```sh
|
||||
pip install great-ai
|
||||
```
|
||||
|
||||
> Create a new file called `main.py`
|
||||
> Create a new file called `demo.py`
|
||||
|
||||
```python
|
||||
from great_ai import GreatAI
|
||||
|
||||
@GreatAI.create
|
||||
def hello_world(name: str) -> str:
|
||||
def greeter(name: str) -> str:
|
||||
return f"Hello {name}!"
|
||||
```
|
||||
|
||||
Start it by executing `great-ai main.py`, find the dashboard at [http://localhost:6060](http://localhost:6060/dashboard).
|
||||
Start it by executing `great-ai demo.py`, find the dashboard at [http://localhost:6060](http://localhost:6060/dashboard).
|
||||
|
||||

|
||||

|
||||
|
||||
That's it. Your GreatAI service is ready for production use. Many of the [SE4ML best-practices](https://se-ml.github.io) are configured and implemented automatically (of course, these can be customised as well).
|
||||
That's it. Your GreatAI service is *nearly* ready for production use. Many of the [SE4ML best-practices](https://se-ml.github.io) are configured and implemented automatically (of course, these can be customised as well).
|
||||
|
||||
[Check out the full documentation here](https://great-ai.scoutinscience.com).
|
||||
|
||||
## Why is this GREAT?
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,11 @@ After installation, `great-ai` and `large-file` are available as commands. The f
|
|||
> Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
|
||||
|
||||
This means that `great-ai.exe` and `large-file.exe` are not in your `PATH`. Either add their containing directory ('C:\Users\...\Scripts' in this case) to your `PATH` or use `python3 -m great_ai` and `python3 -m great_ai.large_file` instead of the exe-s.
|
||||
|
||||
## Update
|
||||
|
||||
If you wish to update to the latest version execute:
|
||||
|
||||
```sh
|
||||
pip install --upgrade great-ai
|
||||
```
|
||||
|
|
|
|||
|
|
@ -54,15 +54,15 @@ Applying AI is becoming increasingly easier but many case studies have shown tha
|
|||
pip install great-ai
|
||||
```
|
||||
|
||||
```python title="hello-world.py"
|
||||
```python title="demo.py"
|
||||
from great_ai import GreatAI
|
||||
|
||||
@GreatAI.create #(1)
|
||||
def hello_world(name: str) -> str: #(2)
|
||||
def greeter(name: str) -> str: #(2)
|
||||
return f"Hello {name}!"
|
||||
```
|
||||
|
||||
1. `@GreatAI.create` wraps your `hello_world` function with a `GreatAI` instance. The function will behave very similarly but:
|
||||
1. `@GreatAI.create` wraps your `greeter` function with a `GreatAI` instance. The function will behave very similarly but:
|
||||
1. its return value becomes a `Trace[str]`,
|
||||
2. it gets a `process_batch` method for supporting parallel execution,
|
||||
3. and it can be deployed using the `great-ai` command-line tool.
|
||||
|
|
@ -70,18 +70,14 @@ def hello_world(name: str) -> str: #(2)
|
|||
2. [Typing functions](https://docs.python.org/3/library/typing.html){ target=_blank } is recommended in general, however, not required for GreatAI to work.
|
||||
|
||||
??? note
|
||||
In practice, `hello_world` could be an inference function of some AI/ML application. But it could also just wrap a black-box solution of some SaaS. Either ways, it is [imperative to have continuos oversight](https://digital-strategy.ec.europa.eu/en/library/ethics-guidelines-trustworthy-ai){ target=_blank } of the services you provide and data you process especially in the context of AI/ML applications.
|
||||
In practice, `greeter` could be an inference function of some AI/ML application. But it could also just wrap a black-box solution of some SaaS. Either ways, it is [imperative to have continuos oversight](https://digital-strategy.ec.europa.eu/en/library/ethics-guidelines-trustworthy-ai){ target=_blank } of the services you provide and data you process especially in the context of AI/ML applications.
|
||||
|
||||
```sh title="terminal"
|
||||
great-ai hello-world.py
|
||||
great-ai demo.py
|
||||
```
|
||||
> Navigate to [localhost:6060](http://127.0.0.1:6060) in your browser.
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly;" markdown>
|
||||
{ loading=lazy }
|
||||
|
||||
{ loading=lazy }
|
||||
</div>
|
||||
{ loading=lazy }
|
||||
|
||||
!!! success
|
||||
Your GreatAI service is ready for production use. Many of the [SE4ML best-practices](https://se-ml.github.io){ target=_blank } are configured and implemented automatically. To have full control over your service and to understand what else you might need to do in your use case, continue reading this documentation.
|
||||
|
|
|
|||
BIN
docs/media/demo.gif
Normal file
BIN
docs/media/demo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 MiB |
BIN
docs/media/demo.mp4
Normal file
BIN
docs/media/demo.mp4
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 619 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 498 KiB |
Loading…
Add table
Add a link
Reference in a new issue