Share
Share
You can easily share your models and datasets on SeeMe.ai. There are two ways to do this:
Public
Public models and datasets are shared with all users on the platform to view and use.
To make a model public, update the public property:
my_model.public = True
client.update_model(my_model)To make a dataset public:
my_dataset.public = True
client.update_dataset(my_dataset)Public models can be found by all users when they call get_models():
models = client.get_models()
public_models = [model for model in models if model.public]Private
You can share your models and datasets privately with specific users by email.
Share a model
from seeme.types import Share
share = client.share_model(
model_id=my_model.id,
email="colleague@example.com",
send_invite=True
)| Parameter | Type | Description |
|---|---|---|
| model_id | str | The model id to share |
| str | The email address of the person to share with | |
| send_invite | bool | Send an email invitation. Default: False |
The share object contains:
| Property | Type | Description |
|---|---|---|
| id | str | Unique id for the share |
| created_at | str | The creation date |
| updated_at | str | Last updated date |
| str | The email address shared with | |
| entity_type | str | The type of entity shared (“models” or “datasets”) |
| entity_id | str | The id of the shared entity |
| without_invite | bool | Whether an invite email was sent |
Get model shares
List all users a model has been shared with:
shares = client.get_model_shares(my_model.id)
for share in shares:
print(f"Shared with: {share.email}")| Parameter | Type | Description |
|---|---|---|
| model_id | str | The model id |
Remove a model share
Revoke access for a specific share:
client.delete_model_share(my_model.id, share.id)| Parameter | Type | Description |
|---|---|---|
| model_id | str | The model id |
| share_id | str | The share id to remove |
Share a dataset
share = client.share_dataset(
dataset_id=my_dataset.id,
email="colleague@example.com",
send_invite=True
)| Parameter | Type | Description |
|---|---|---|
| dataset_id | str | The dataset id to share |
| str | The email address of the person to share with | |
| send_invite | bool | Send an email invitation. Default: False |
View shared models
Models shared with you appear when you call get_models():
models = client.get_models()
shared_with_me = [model for model in models if model.shared_with_me]