djai.model.models.ml.hugging_face.table_question_answering module

DjAI Pre-Trained Hugging Face Table Question Answerer Model class.

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

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

DjAI Pre-Trained Hugging Face Table Question Answerer 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: |-Dataframe(label="Data Table") |-Textbox(label="Query") |-Checkbox(label="Sequential?") |-Checkbox(label="Padding?") |-Checkbox(label="Truncation?") outputs: |-JSON(label="Likely Answer(s)")
polymorphic_primary_key_name = 'uuid'
polymorphic_super_sub_accessors_replaced = False
predict(table: Union[dict, pandas.core.frame.DataFrame], queries: Union[str, collections.abc.Sequence[str]], sequential: bool = False, padding: Union[bool, str] = False, truncation: Union[bool, str] = False) Union[dict, List[dict]][source]

Answer Question(s) on a Tabular Data Set.

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