code: def text_analysis(text):
      doc = nlp(text)
      html = displacy.render(doc, style="dep", page=True)
      html = (
          "<div style='max-width:100%; max-height:360px; overflow:auto'>"
          + html
          + "</div>"
      )
      pos_count = {
          "char_count": len(text),
          "token_count": 0,
      }
      pos_tokens = []
  
      for token in doc:
          pos_tokens.extend([(token.text, token.pos_), (" ", None)])
  
      return pos_tokens, pos_count, html
  
imports: import gradio
  import os
  import spacy
  from spacy import displacy
label_desc: Use image node_id 1 for calling a global function with example usage: text_analysis(text) and returns: pos_tokens,  pos_count,  html