djai.model.models.ml.hugging_face.mask_filling module

DjAI Pre-Trained Hugging Face Mask Filler Model class.

class djai.model.models.ml.hugging_face.mask_filling.PreTrainedHuggingFaceMaskFiller(*args, **kwargs)[source]

Bases: djai.model.models.ml.hugging_face.base.PreTrainedHuggingFaceTransformer

DjAI Pre-Trained Hugging Face Mask Filler Model class.

exception DoesNotExist

Bases: djai.model.models.ml.hugging_face.base.PreTrainedHuggingFaceTransformer.DoesNotExist

exception MultipleObjectsReturned

Bases: djai.model.models.ml.hugging_face.base.PreTrainedHuggingFaceTransformer.MultipleObjectsReturned

gradio_ui = Gradio Interface for: _predict ------------------------------ inputs: |-Textbox(label="Text to Generate from") |-Dataframe(label="Targets") |-Slider(label="No. of Labels to Return") outputs: |-Label(label="Generated Text")
polymorphic_primary_key_name = 'uuid'
polymorphic_super_sub_accessors_replaced = False
predict(text_or_texts: Union[str, collections.abc.Sequence[str]], targets: Optional[List[str]] = None, n_labels: int = 5) Union[Dict[str, float], List[Dict[str, float]]][source]

Classify Image(s).

pretrainedhuggingfacetransformer_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.

pretrainedhuggingfacetransformer_ptr_id