class_docstr: The Hub Utils to deal with the http request. And other staticmethod for hub.
  
  Args:
      author (`str`):
          The author of the repo.
      repo (`str`):
          The name of the repo.
      root (`str`):
          The root url where the repo located.
class_docstr_tok: ["The","Hub","Utils","to","deal","with","the","http","request",".","And","other","staticmethod","for","hub",".","Args",":","author","(","`","str","`",")",":","The","author","of","the","repo",".","repo","(","`","str","`",")",":","The","name","of","the","repo",".","root","(","`","str","`",")",":","The","root","url","where","the","repo","located","."]
docstr: Update the file from ori_str_list to tar_str_list and rename it with the new filename.
  
  Args:
      ori_str_list (`list`):
          The original str list to be replaced
      tar_str_list (`list`):
          The target str list after replace
      file (`str`):
          The original file name to be updated
      new_file (`str`):
          The target file name after update
docstr_tok: ["Update","the","file","from","ori_str_list","to","tar_str_list","and","rename","it","with","the","new","filename",".","Args",":","ori_str_list","(","`","list","`",")",":","The","original","str","list","to","be","replaced","tar_str_list","(","`","list","`",")",":","The","target","str","list","after","replace","file","(","`","str","`",")",":","The","original","file","name","to","be","updated","new_file","(","`","str","`",")",":","The","target","file","name","after","update"]
code: def update_text(
      ori_str_list: list, tar_str_list: list, file: str, new_file: str
  ) -> None:
      """
      Update the file from ori_str_list to tar_str_list and rename it with the new filename.
  
      Args:
          ori_str_list (`list`):
              The original str list to be replaced
          tar_str_list (`list`):
              The target str list after replace
          file (`str`):
              The original file name to be updated
          new_file (`str`):
              The target file name after update
      """
      with open(file, "r", encoding="utf-8") as f1:
          file_text = f1.read()
      # Replace the target string
      for ori_str, tar_str in zip(ori_str_list, tar_str_list):
          file_text = file_text.replace(ori_str, tar_str)
      with open(new_file, "w", encoding="utf-8") as f2:
          f2.write(file_text)
  
imports: import random
  import traceback
  import requests
  from requests.exceptions import HTTPError
  from requests.auth import HTTPBasicAuth
  from towhee.utils.log import engine_log
label_desc: Use image node_id 21 for calling the HubUtils obj's underlying member method code with example usage: obj.update_text(ori_str_list, tar_str_list, file, new_file) without return types