class_docstr: ActionClip model.
  
  Args:
      - clip_model (`nn.Module`):
          CLIP model
      - visual_prompt (`nn.Module`):
          Visual prompt.
      - text_prompt_flat (`bool`):
          Flag to control whether to use text prompt.
class_docstr_tok: ["ActionClip","model",".","Args",":","-","clip_model","(","`","nn.Module","`",")",":","CLIP","model","-","visual_prompt","(","`","nn.Module","`",")",":","Visual","prompt",".","-","text_prompt_flat","(","`","bool","`",")",":","Flag","to","control","whether","to","use","text","prompt","."]
code: def encode_text(self, text: list):
      if self.text_prompt_flag:
          text, _, _ = text_prompt(text)
      if hasattr(self.clip_model, "encode_text"):
          text_features = self.clip_model.encode_text(text)
      else:
          text_features = self.clip_model(text)
      return text_features
  
file_path: towhee/towhee/models/action_clip/action_clip.py
imports: from typing import Union
  import torch.cuda
  from torch import nn
  from towhee.models import clip
  from towhee.models.action_clip.action_clip_utils import map_state_dict, get_configs
  from towhee.models.action_clip.text_prompt import text_prompt
  from towhee.models.action_clip.visual_prompt import VisualPrompt
label_desc: Use image node_id 3 for calling the ActionClip obj's underlying member method code with example usage: obj.encode_text(text) and returns: text_features