now.apps.text_to_text_and_image.app module#

class now.apps.text_to_text_and_image.app.TextToTextAndImage[source]#

Bases: now.apps.base.app.JinaNOWApp

Hybrid text to text+image search combining symbolic and neural IR approaches.

property app_name: now.constants.Apps#

Name of the app. Should be an enum value set in now.constants.Apps

Return type

Apps

property is_enabled: bool#

Set to True if this app is enabled for the end user.

Return type

bool

property description: str#

Short description of the app.

Return type

str

set_flow_yaml(**kwargs)[source]#

configure the flow yaml in the Jina NOW app.

property input_modality: now.constants.Modalities#

Modality used for running search queries

Return type

Modalities

property output_modality: now.constants.Modalities#

Modality used for indexing data

Return type

Modalities

preprocess(da, user_input, is_indexing=False)[source]#

Loads and preprocesses every document such that it is ready for finetuning/indexing.

Return type

DocumentArray

setup(dataset, user_input, kubectl_path)[source]#

Runs before the flow is deployed. Common use cases:

  • create a database

  • finetune a model + push the artifact

  • notify other services

  • check if starting the app is currently possible

Parameters
  • dataset (DocumentArray) –

  • user_input (UserInput) – user configuration based on the given options

Return type

Dict

Returns

dict used to replace variables in flow yaml and to clean up resources after the flow is terminated