djai.model.models.cloud_ai_svc package

DjAI Cloud AI Service model classes.

class djai.model.models.cloud_ai_svc.CloudAIService(*args, **kwargs)[source]

Bases: djai.model.models.base.AIModel

DjAI Cloud AI Service model class.

exception DoesNotExist

Bases: djai.model.models.base.AIModel.DoesNotExist

exception MultipleObjectsReturned

Bases: djai.model.models.base.AIModel.MultipleObjectsReturned

aimodel_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

aimodel_ptr_id
google_translate

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

polymorphic_primary_key_name = 'uuid'
polymorphic_super_sub_accessors_replaced = False
class djai.model.models.cloud_ai_svc.GoogleTranslate(*args, **kwargs)[source]

Bases: djai.model.models.cloud_ai_svc.base.CloudAIService

Google Translate Service.

exception DoesNotExist

Bases: djai.model.models.cloud_ai_svc.base.CloudAIService.DoesNotExist

exception MultipleObjectsReturned

Bases: djai.model.models.cloud_ai_svc.base.CloudAIService.MultipleObjectsReturned

client = None
cloudaiservice_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

cloudaiservice_ptr_id
gradio_ui = Gradio Interface for: predict ----------------------------- inputs: |-Textbox(label="Text to Translate") |-Dropdown(label="Source Language") |-Dropdown(label="Destination Language") outputs: |-Textbox(label="Translated Text")
load() None[source]

Load Google Translate Client.

polymorphic_primary_key_name = 'uuid'
polymorphic_super_sub_accessors_replaced = False
predict(text_or_texts: Union[str, collections.abc.Sequence[str]], src: str = 'auto', dest: str = 'en') Union[str, List[str]][source]

Translate.

Subpackages

Submodules