Spaces:
Running on Zero
Running on Zero
Download separation_errors.py from Lunaron/lunaron-audio-separation: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/Lunaron/lunaron-audio-separation/resolve/main/separation_errors.py
- Command line
-
hf download hf://spaces/Lunaron/lunaron-audio-separation/separation_errors.py
-
curl -L -o separation_errors.py https://huggingface.co/spaces/Lunaron/lunaron-audio-separation/resolve/main/separation_errors.py
921 Bytes
| """利用者へ送る分離エラーは固定の分類と文章だけに限定する。""" | |
| def separation_error(error): | |
| text = str(error).lower() | |
| if 'space app has reached its gpu limit' in text: | |
| return ('gpu_capacity', '分離サーバーのGPU利用枠に達したため、処理を開始できませんでした。時間を置いて同じ音源で再試行してください。') | |
| if 'zerogpu' in text and ('quota' in text or 'limit' in text): | |
| return ('gpu_quota', '分離サーバーのGPU利用枠が不足しています。時間を置いて同じ音源で再試行してください。') | |
| if 'cuda out of memory' in text: | |
| return ('gpu_memory', '分離処理に必要なGPUメモリが不足しました。短い範囲で再試行してください。') | |
| return ('processing_failed', '分離処理に失敗しました。設定画面から再試行してください。') | |