now.app.text_to_text_and_image.app module#

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

Bases: now.app.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: List[now.constants.Modalities]#

Modality used for running search queries

Return type

List[Modalities]

property output_modality: List[now.constants.Modalities]#

Modality used for indexing data

Return type

List[Modalities]

preprocess(da, user_input, process_index=False, process_query=True)[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

get_index_query_access_paths(search_fields=None)[source]#

Gives access paths for indexing and searching.

Return type

str