





"""simple docstring"""


import inspect
from typing import Optional, Union

import numpy as np
import PIL
import torch
from torch.nn import functional as F
from torchvision import transforms
from transformers import CLIPFeatureExtractor, CLIPModel, CLIPTextModel, CLIPTokenizer

from diffusers import (
    AutoencoderKL,
    DDIMScheduler,
    DiffusionPipeline,
    DPMSolverMultistepScheduler,
    LMSDiscreteScheduler,
    PNDMScheduler,
    UNetaDConditionModel,
)
from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion import StableDiffusionPipelineOutput
from diffusers.utils import (
    PIL_INTERPOLATION,
    randn_tensor,
)




def 					lowercase__    (					lowercase_		,lowercase_		,lowercase_			)					->		List[Any]:




      """simple docstring"""

      if isinstance(_lowerCAmelCase		,torch.Tensor			):
            return image
      elif isinstance(_lowerCAmelCase		,PIL.Image.Image			):
            _UpperCamelCase      :	List[Any]						=       [image]

      if isinstance(image[0]		,PIL.Image.Image			):
            _UpperCamelCase      :	Any						=       [np.array(i.resize((w, h)		,resample=PIL_INTERPOLATION["lanczos"]			)			)[None, :] for i in image]
            _UpperCamelCase      :	List[str]						=       np.concatenate(_lowerCAmelCase		,axis=0			)
            _UpperCamelCase      :	Tuple						=       np.array(_lowerCAmelCase			).astype(np.floataa			) / 255.0
            _UpperCamelCase      :	Optional[Any]						=       image.transpose(0		,3		,1		,2			)
            _UpperCamelCase      :	List[str]						=       2.0 * image - 1.0
            _UpperCamelCase      :	List[Any]						=       torch.from_numpy(_lowerCAmelCase			)
      elif isinstance(image[0]		,torch.Tensor			):
            _UpperCamelCase      :	List[Any]						=       torch.cat(_lowerCAmelCase		,dim=0			)
      return image




def 					lowercase__    (					lowercase_		,lowercase_		,lowercase_		,lowercase_=0.9995			)					->		Any:




      """simple docstring"""

      if not isinstance(_lowerCAmelCase		,np.ndarray			):
            _UpperCamelCase      :	Tuple						=       True
            _UpperCamelCase      :	Any						=       va.device
            _UpperCamelCase      :	Tuple						=       va.cpu().numpy()
            _UpperCamelCase      :	Tuple						=       va.cpu().numpy()

      _UpperCamelCase      :	List[Any]						=       np.sum(va * va / (np.linalg.norm(_lowerCAmelCase			) * np.linalg.norm(_lowerCAmelCase			))			)
      if np.abs(_lowerCAmelCase			) > DOT_THRESHOLD:
            _UpperCamelCase      :	List[str]						=       (1 - t) * va + t * va
      else:
            _UpperCamelCase      :	List[Any]						=       np.arccos(_lowerCAmelCase			)
            _UpperCamelCase      :	Tuple						=       np.sin(_lowerCAmelCase			)
            _UpperCamelCase      :	List[str]						=       theta_a * t
            _UpperCamelCase      :	List[Any]						=       np.sin(_lowerCAmelCase			)
            _UpperCamelCase      :	List[Any]						=       np.sin(theta_a - theta_t			) / sin_theta_a
            _UpperCamelCase      :	int						=       sin_theta_t / sin_theta_a
            _UpperCamelCase      :	List[Any]						=       sa * va + sa * va

      if inputs_are_torch:
            _UpperCamelCase      :	int						=       torch.from_numpy(_lowerCAmelCase			).to(_lowerCAmelCase			)

      return va




def 					lowercase__    (					lowercase_		,lowercase_			)					->		str:




      """simple docstring"""

      _UpperCamelCase      :	Union[str, Any]						=       F.normalize(_lowerCAmelCase		,dim=-1			)
      _UpperCamelCase      :	Union[str, Any]						=       F.normalize(_lowerCAmelCase		,dim=-1			)
      return (x - y).norm(dim=-1			).div(2			).arcsin().pow(2			).mul(2			)




def 					lowercase__    (					lowercase_		,lowercase_			)					->		str:




      """simple docstring"""

      for param in model.parameters():
            _UpperCamelCase      :	Tuple						=       value



class      __SCREAMING_SNAKE_CASE    (						_UpperCamelCase   ):

  def __init__(		self   :       List[Any]					,   __a   :       AutoencoderKL					,   __a   :       CLIPTextModel					,   __a   :       CLIPModel					,   __a   :       CLIPTokenizer					,   __a   :       UNetaDConditionModel					,   __a   :       Union[PNDMScheduler, LMSDiscreteScheduler, DDIMScheduler, DPMSolverMultistepScheduler]					,   __a   :       CLIPFeatureExtractor					,   __a   :       List[str]=None					,   __a   :       Dict=None					,   __a   :       int=None					,   )		->				Optional[int]:
        super().__init__()
        self.register_modules(
            vae=__A					,   text_encoder=__A					,   clip_model=__A					,   tokenizer=__A					,   unet=__A					,   scheduler=__A					,   feature_extractor=__A					,   coca_model=__A					,   coca_tokenizer=__A					,   coca_transform=__A					,   )
        _UpperCamelCase      :	Any						=       (
            feature_extractor.size
            if isinstance(feature_extractor.size					,   __A	)
            else feature_extractor.size["shortest_edge"]
        )
        _UpperCamelCase      :	str						=       transforms.Normalize(mean=feature_extractor.image_mean					,   std=feature_extractor.image_std	)
        set_requires_grad(self.text_encoder					,   __A	)
        set_requires_grad(self.clip_model					,   __A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       List[str]					,   __a   :       Optional[Union[str, int]] = "auto"	)		->				List[Any]:
        if slice_size == "auto":
              # half the attention head size is usually a good trade-off between
              # speed and memory
              _UpperCamelCase      :	Optional[int]						=       self.unet.config.attention_head_dim // 2
        self.unet.set_attention_slice(__A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[Any]	)		->				int:
        self.enable_attention_slicing(__A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       int	)		->				Tuple:
        set_requires_grad(self.vae					,   __A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[int]	)		->				Tuple:
        set_requires_grad(self.vae					,   __A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[Any]	)		->				List[Any]:
        set_requires_grad(self.unet					,   __A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       List[Any]	)		->				Any:
        set_requires_grad(self.unet					,   __A	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       Any					,   __a   :       Tuple					,   __a   :       Tuple					,   __a   :       List[str]	)		->				int:
        # get the original timestep using init_timestep
        _UpperCamelCase      :	Union[str, Any]						=       min(int(num_inference_steps * strength	)					,   __A	)

        _UpperCamelCase      :	int						=       max(num_inference_steps - init_timestep					,   0	)
        _UpperCamelCase      :	Union[str, Any]						=       self.scheduler.timesteps[t_start:]

        return timesteps, num_inference_steps - t_start

  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[Any]					,   __a   :       Tuple					,   __a   :       Optional[int]					,   __a   :       Union[str, Any]					,   __a   :       Dict					,   __a   :       List[Any]					,   __a   :       Optional[Any]=None	)		->				str:
        if not isinstance(__A					,   torch.Tensor	):
              raise ValueError(F'''`image` has to be of type `torch.Tensor` but is {type(__A	)}'''	)

        _UpperCamelCase      :	List[str]						=       image.to(device=__A					,   dtype=__A	)

        if isinstance(__A					,   __A	):
              _UpperCamelCase      :	str						=       [
                  self.vae.encode(image[i : i + 1]	).latent_dist.sample(generator[i]	) for i in range(__A	)
              ]
              _UpperCamelCase      :	List[str]						=       torch.cat(__A					,   dim=0	)
        else:
              _UpperCamelCase      :	Union[str, Any]						=       self.vae.encode(__A	).latent_dist.sample(__A	)

        # Hardcode 0.18215 because stable-diffusion-2-base has not self.vae.config.scaling_factor
        _UpperCamelCase      :	int						=       0.1_82_15 * init_latents
        _UpperCamelCase      :	int						=       init_latents.repeat_interleave(__A					,   dim=0	)

        _UpperCamelCase      :	List[Any]						=       randn_tensor(init_latents.shape					,   generator=__A					,   device=__A					,   dtype=__A	)

        # get latents
        _UpperCamelCase      :	Union[str, Any]						=       self.scheduler.add_noise(__A					,   __A					,   __A	)
        _UpperCamelCase      :	Union[str, Any]						=       init_latents

        return latents

  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[int]					,   __a   :       Optional[int]	)		->				Optional[int]:
        _UpperCamelCase      :	str						=       self.coca_transform(__A	).unsqueeze(0	)
        with torch.no_grad(), torch.cuda.amp.autocast():
              _UpperCamelCase      :	Optional[Any]						=       self.coca_model.generate(transformed_image.to(device=self.device					,   dtype=self.coca_model.dtype	)	)
        _UpperCamelCase      :	int						=       self.coca_tokenizer.decode(generated[0].cpu().numpy()	)
        return generated.split("<end_of_text>"	)[0].replace("<start_of_text>"					,   ""	).rstrip(" .,"	)

  def    __SCREAMING_SNAKE_CASE				(		self   :       Any					,   __a   :       Tuple					,   __a   :       Tuple	)		->				List[str]:
        _UpperCamelCase      :	Optional[int]						=       self.feature_extractor.preprocess(__A	)
        _UpperCamelCase      :	Optional[Any]						=       torch.from_numpy(clip_image_input["pixel_values"][0]	).unsqueeze(0	).to(self.device	).half()
        _UpperCamelCase      :	Dict						=       self.clip_model.get_image_features(__A	)
        _UpperCamelCase      :	Any						=       image_embeddings_clip / image_embeddings_clip.norm(p=2					,   dim=-1					,   keepdim=__A	)
        _UpperCamelCase      :	List[str]						=       image_embeddings_clip.repeat_interleave(__A					,   dim=0	)
        return image_embeddings_clip

  @torch.enable_grad()
  def    __SCREAMING_SNAKE_CASE				(		self   :       str					,   __a   :       List[str]					,   __a   :       Union[str, Any]					,   __a   :       List[Any]					,   __a   :       Dict					,   __a   :       List[Any]					,   __a   :       Union[str, Any]					,   __a   :       Union[str, Any]					,   )		->				Union[str, Any]:
        _UpperCamelCase      :	Dict						=       latents.detach().requires_grad_()

        _UpperCamelCase      :	Dict						=       self.scheduler.scale_model_input(__A					,   __A	)

        # predict the noise residual
        _UpperCamelCase      :	int						=       self.unet(__A					,   __A					,   encoder_hidden_states=__A	).sample

        if isinstance(self.scheduler					,   (PNDMScheduler, DDIMScheduler, DPMSolverMultistepScheduler)	):
              _UpperCamelCase      :	List[str]						=       self.scheduler.alphas_cumprod[timestep]
              _UpperCamelCase      :	Union[str, Any]						=       1 - alpha_prod_t
              # compute predicted original sample from predicted noise also called
              # "predicted x_0" of formula (12) from https://arxiv.org/pdf/2010.02502.pdf
              _UpperCamelCase      :	List[str]						=       (latents - beta_prod_t ** 0.5 * noise_pred) / alpha_prod_t ** 0.5

              _UpperCamelCase      :	str						=       torch.sqrt(__A	)
              _UpperCamelCase      :	List[Any]						=       pred_original_sample * (fac) + latents * (1 - fac)
        elif isinstance(self.scheduler					,   __A	):
              _UpperCamelCase      :	List[str]						=       self.scheduler.sigmas[index]
              _UpperCamelCase      :	Optional[Any]						=       latents - sigma * noise_pred
        else:
              raise ValueError(F'''scheduler type {type(self.scheduler	)} not supported'''	)

        # Hardcode 0.18215 because stable-diffusion-2-base has not self.vae.config.scaling_factor
        _UpperCamelCase      :	List[Any]						=       1 / 0.1_82_15 * sample
        _UpperCamelCase      :	Any						=       self.vae.decode(__A	).sample
        _UpperCamelCase      :	Optional[int]						=       (image / 2 + 0.5).clamp(0					,   1	)

        _UpperCamelCase      :	str						=       transforms.Resize(self.feature_extractor_size	)(__A	)
        _UpperCamelCase      :	Optional[int]						=       self.normalize(__A	).to(latents.dtype	)

        _UpperCamelCase      :	Any						=       self.clip_model.get_image_features(__A	)
        _UpperCamelCase      :	Union[str, Any]						=       image_embeddings_clip / image_embeddings_clip.norm(p=2					,   dim=-1					,   keepdim=__A	)

        _UpperCamelCase      :	Union[str, Any]						=       spherical_dist_loss(__A					,   __A	).mean() * clip_guidance_scale

        _UpperCamelCase      :	str						=       -torch.autograd.grad(__A					,   __A	)[0]

        if isinstance(self.scheduler					,   __A	):
              _UpperCamelCase      :	List[str]						=       latents.detach() + grads * (sigma**2)
              _UpperCamelCase      :	Optional[Any]						=       noise_pred_original
        else:
              _UpperCamelCase      :	List[Any]						=       noise_pred_original - torch.sqrt(__A	) * grads
        return noise_pred, latents


  @torch.no_grad()
  def __call__(		self   :       Optional[int]					,   __a   :       Union[torch.FloatTensor, PIL.Image.Image]					,   __a   :       Union[torch.FloatTensor, PIL.Image.Image]					,   __a   :       Optional[str] = None					,   __a   :       Optional[str] = None					,   __a   :       Optional[int] = 512					,   __a   :       Optional[int] = 512					,   __a   :       float = 0.6					,   __a   :       Optional[int] = 50					,   __a   :       Optional[float] = 7.5					,   __a   :       Optional[int] = 1					,   __a   :       float = 0.0					,   __a   :       Optional[float] = 100					,   __a   :       Optional[torch.Generator] = None					,   __a   :       Optional[str] = "pil"					,   __a   :       bool = True					,   __a   :       float = 0.8					,   __a   :       float = 0.1					,   __a   :       float = 0.1					,   )		->				Optional[int]:
        if isinstance(__A					,   __A	) and len(__A	) != batch_size:
              raise ValueError(F'''You have passed {batch_size} batch_size, but only {len(__A	)} generators.'''	)

        if height % 8 != 0 or width % 8 != 0:
              raise ValueError(F'''`height` and `width` have to be divisible by 8 but are {height} and {width}.'''	)

        if isinstance(__A					,   torch.Generator	) and batch_size > 1:
              _UpperCamelCase      :	List[str]						=       [generator] + [None] * (batch_size - 1)

        _UpperCamelCase      :	Dict						=       [
            ("model", self.coca_model is None),
            ("tokenizer", self.coca_tokenizer is None),
            ("transform", self.coca_transform is None),
        ]
        _UpperCamelCase      :	str						=       [x[0] for x in coca_is_none if x[1]]
        _UpperCamelCase      :	List[Any]						=       ", ".join(__A	)
        # generate prompts with coca model if prompt is None
        if content_prompt is None:
              if len(__A	):
                    raise ValueError(
                        F'''Content prompt is None and CoCa [{coca_is_none_str}] is None.'''
                        F'''Set prompt or pass Coca [{coca_is_none_str}] to DiffusionPipeline.'''	)
              _UpperCamelCase      :	List[str]						=       self.get_image_description(__A	)
        if style_prompt is None:
              if len(__A	):
                    raise ValueError(
                        F'''Style prompt is None and CoCa [{coca_is_none_str}] is None.'''
                        F''' Set prompt or pass Coca [{coca_is_none_str}] to DiffusionPipeline.'''	)
              _UpperCamelCase      :	List[str]						=       self.get_image_description(__A	)

        # get prompt text embeddings for content and style
        _UpperCamelCase      :	str						=       self.tokenizer(
            __A					,   padding="max_length"					,   max_length=self.tokenizer.model_max_length					,   truncation=__A					,   return_tensors="pt"					,   )
        _UpperCamelCase      :	Optional[int]						=       self.text_encoder(content_text_input.input_ids.to(self.device	)	)[0]

        _UpperCamelCase      :	Optional[int]						=       self.tokenizer(
            __A					,   padding="max_length"					,   max_length=self.tokenizer.model_max_length					,   truncation=__A					,   return_tensors="pt"					,   )
        _UpperCamelCase      :	List[str]						=       self.text_encoder(style_text_input.input_ids.to(self.device	)	)[0]

        _UpperCamelCase      :	Optional[int]						=       slerp(__A					,   __A					,   __A	)

        # duplicate text embeddings for each generation per prompt
        _UpperCamelCase      :	Optional[int]						=       text_embeddings.repeat_interleave(__A					,   dim=0	)

        # set timesteps
        _UpperCamelCase      :	List[str]						=       "offset" in set(inspect.signature(self.scheduler.set_timesteps	).parameters.keys()	)
        _UpperCamelCase      :	Union[str, Any]						=       {}
        if accepts_offset:
              _UpperCamelCase      :	Dict						=       1

        self.scheduler.set_timesteps(__A					,   **__A	)
        # Some schedulers like PNDM have timesteps as arrays
        # It's more optimized to move all timesteps to correct device beforehand
        self.scheduler.timesteps.to(self.device	)

        _UpperCamelCase      :	Any						=       self.get_timesteps(__A					,   __A					,   self.device	)
        _UpperCamelCase      :	Optional[int]						=       timesteps[:1].repeat(__A	)

        # Preprocess image
        _UpperCamelCase      :	int						=       preprocess(__A					,   __A					,   __A	)
        _UpperCamelCase      :	Optional[int]						=       self.prepare_latents(
            __A					,   __A					,   __A					,   text_embeddings.dtype					,   self.device					,   __A	)

        _UpperCamelCase      :	Tuple						=       preprocess(__A					,   __A					,   __A	)
        _UpperCamelCase      :	Optional[int]						=       self.prepare_latents(
            __A					,   __A					,   __A					,   text_embeddings.dtype					,   self.device					,   __A	)

        _UpperCamelCase      :	Tuple						=       slerp(__A					,   __A					,   __A	)

        if clip_guidance_scale > 0:
              _UpperCamelCase      :	Dict						=       self.get_clip_image_embeddings(__A					,   __A	)
              _UpperCamelCase      :	Dict						=       self.get_clip_image_embeddings(__A					,   __A	)
              _UpperCamelCase      :	Any						=       slerp(
                  __A					,   __A					,   __A	)

        # here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
        # of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
        # corresponds to doing no classifier free guidance.
        _UpperCamelCase      :	List[str]						=       guidance_scale > 1.0
        # get unconditional embeddings for classifier free guidance
        if do_classifier_free_guidance:
              _UpperCamelCase      :	Union[str, Any]						=       content_text_input.input_ids.shape[-1]
              _UpperCamelCase      :	Tuple						=       self.tokenizer([""]					,   padding="max_length"					,   max_length=__A					,   return_tensors="pt"	)
              _UpperCamelCase      :	List[Any]						=       self.text_encoder(uncond_input.input_ids.to(self.device	)	)[0]
              # duplicate unconditional embeddings for each generation per prompt
              _UpperCamelCase      :	str						=       uncond_embeddings.repeat_interleave(__A					,   dim=0	)

              # For classifier free guidance, we need to do two forward passes.
              # Here we concatenate the unconditional and text embeddings into a single batch
              # to avoid doing two forward passes
              _UpperCamelCase      :	Optional[Any]						=       torch.cat([uncond_embeddings, text_embeddings]	)

        # get the initial random noise unless the user supplied it

        # Unlike in other pipelines, latents need to be generated in the target device
        # for 1-to-1 results reproducibility with the CompVis implementation.
        # However this currently doesn't work in `mps`.
        _UpperCamelCase      :	List[str]						=       (batch_size, self.unet.config.in_channels, height // 8, width // 8)
        _UpperCamelCase      :	int						=       text_embeddings.dtype
        if latents is None:
              if self.device.type == "mps":
                    # randn does not work reproducibly on mps
                    _UpperCamelCase      :	List[Any]						=       torch.randn(__A					,   generator=__A					,   device="cpu"					,   dtype=__A	).to(
                        self.device	)
              else:
                    _UpperCamelCase      :	Any						=       torch.randn(__A					,   generator=__A					,   device=self.device					,   dtype=__A	)
        else:
              if latents.shape != latents_shape:
                    raise ValueError(F'''Unexpected latents shape, got {latents.shape}, expected {latents_shape}'''	)
              _UpperCamelCase      :	str						=       latents.to(self.device	)

        # scale the initial noise by the standard deviation required by the scheduler
        _UpperCamelCase      :	List[Any]						=       latents * self.scheduler.init_noise_sigma

        # prepare extra kwargs for the scheduler step, since not all schedulers have the same signature
        # eta (η) is only used with the DDIMScheduler, it will be ignored for other schedulers.
        # eta corresponds to η in DDIM paper: https://arxiv.org/abs/2010.02502
        # and should be between [0, 1]
        _UpperCamelCase      :	str						=       "eta" in set(inspect.signature(self.scheduler.step	).parameters.keys()	)
        _UpperCamelCase      :	Any						=       {}
        if accepts_eta:
              _UpperCamelCase      :	List[str]						=       eta

        # check if the scheduler accepts generator
        _UpperCamelCase      :	str						=       "generator" in set(inspect.signature(self.scheduler.step	).parameters.keys()	)
        if accepts_generator:
              _UpperCamelCase      :	str						=       generator

        with self.progress_bar(total=__A	):
              for i, t in enumerate(__A	):
                    # expand the latents if we are doing classifier free guidance
                    _UpperCamelCase      :	Tuple						=       torch.cat([latents] * 2	) if do_classifier_free_guidance else latents
                    _UpperCamelCase      :	Union[str, Any]						=       self.scheduler.scale_model_input(__A					,   __A	)

                    # predict the noise residual
                    _UpperCamelCase      :	Optional[Any]						=       self.unet(__A					,   __A					,   encoder_hidden_states=__A	).sample

                    # perform classifier free guidance
                    if do_classifier_free_guidance:
                          _UpperCamelCase      :	Any						=       noise_pred.chunk(2	)
                          _UpperCamelCase      :	List[str]						=       noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)

                    # perform clip guidance
                    if clip_guidance_scale > 0:
                          _UpperCamelCase      :	Optional[Any]						=       (
                              text_embeddings.chunk(2	)[1] if do_classifier_free_guidance else text_embeddings
                          )
                          _UpperCamelCase      :	Dict						=       self.cond_fn(
                              __A					,   __A					,   __A					,   __A					,   __A					,   __A					,   __A					,   )

                    # compute the previous noisy sample x_t -> x_t-1
                    _UpperCamelCase      :	Any						=       self.scheduler.step(__A					,   __A					,   __A					,   **__A	).prev_sample

        # Hardcode 0.18215 because stable-diffusion-2-base has not self.vae.config.scaling_factor
        _UpperCamelCase      :	List[Any]						=       1 / 0.1_82_15 * latents
        _UpperCamelCase      :	Dict						=       self.vae.decode(__A	).sample

        _UpperCamelCase      :	Optional[Any]						=       (image / 2 + 0.5).clamp(0					,   1	)
        _UpperCamelCase      :	List[str]						=       image.cpu().permute(0					,   2					,   3					,   1	).numpy()

        if output_type == "pil":
              _UpperCamelCase      :	List[str]						=       self.numpy_to_pil(__A	)

        if not return_dict:
              return (image, None)

        return StableDiffusionPipelineOutput(images=__A					,   nsfw_content_detected=__A	)







"""simple docstring"""


from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate



@dataclass(frozen=_UpperCamelCase   )
class      __SCREAMING_SNAKE_CASE    (						_UpperCamelCase   ):







  '''simple docstring'''


  SCREAMING_SNAKE_CASE__							:str	     =					field(default="summarization"		,  metadata={"include_in_asdict_even_if_is_default": True}   )
  SCREAMING_SNAKE_CASE__							:ClassVar[Features]	     =					Features({"text": Value("string"   )}   )
  SCREAMING_SNAKE_CASE__							:ClassVar[Features]	     =					Features({"summary": Value("string"   )}   )
  SCREAMING_SNAKE_CASE__							:str	     =					"text"
  SCREAMING_SNAKE_CASE__							:str	     =					"summary"

  @property
  def    __SCREAMING_SNAKE_CASE				(		self   :       List[Any]	)		->				Dict[str, str]:
        return {self.text_column: "text", self.summary_column: "summary"}
