zyddnys / manga-image-translator

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/
https://cotrans.touhou.ai/
GNU General Public License v3.0
4.92k stars 513 forks source link

[Feature Request]: run_as_kaggle #562

Open yunshaochu opened 7 months ago

yunshaochu commented 7 months ago

What would your feature do?

# Set up the environment.
!git clone https://github.com/zyddnys/manga-image-translator
%cd manga-image-translator/
!python -m pip install -r requirements.txt
!python -m pip install git+https://github.com/kodalli/pydensecrf.git
!pip install -q pyngrok

# 填写ngrok的token
ngrokToken = ""
if ngrokToken:
  from pyngrok import conf, ngrok
  conf.get_default().auth_token = ngrokToken
  conf.get_default().monitor_thread = False
  ssh_tunnels = ngrok.get_tunnels(conf.get_default())
  if len(ssh_tunnels) == 0:
      ssh_tunnel = ngrok.connect(5003)
      print('address:'+ssh_tunnel.public_url)
  else:
      print('address:'+ssh_tunnels[0].public_url)

!python -m manga_translator --verbose --mode web --use-gpu
HebatullahHesham commented 1 month ago

Please How to use SadTalker gradio WebUI on kaggle notebook by connecting it with Ngrok?

HebatullahHesham commented 1 month ago

Unenable to use SadTalker Gradio WebUI on Kaggle:

Please How to use SadTalker gradio WebUI on kaggle notebook by connecting it with Ngrok? Is Kaggle have banned using WebUIs directly?

Please, I need help. Here is the code I run on cells for using SadTalker on Kaggle that doesn't lead me to use the WebUI:

  1. !git clone https://github.com/vinthony/SadTalker.git
  2. %cd SadTalker
  3. !pip install -r requirements.txt
  4. !bash scripts/download_models.sh
  5. !bash webui.sh

It always appears to be the same issue again and again, even if I try to install, upgrade, or downgrade a specific Gradio version.

File "app_sadtalker.py", line 35, in sadtalker_demo with gr.Row().style(equal_height=False): AttributeError: 'Row' object has no attribute 'style'

I have solved this issue on my local device by installing the required Python version, which was 3.10.6, uninstalling other versions on my device, and making sure to delete the remaining corrupted files from the older version so it can be fixed if there is a conflict with the other version.

I really appreciate your help because I have asked ChatGPT, and it was absolutely dumb.