# 本地搭建翻译网站和接口 **Repository Path**: fkly/local-translation-website-or-api ## Basic Information - **Project Name**: 本地搭建翻译网站和接口 - **Description**: 百分百成功率搭建翻译网站和接口 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-28 - **Last Updated**: 2024-07-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 本地搭建翻译网站和接口 #### 介绍 百分百成功率搭建翻译网站和接口 #### 原文链接 https://blog.csdn.net/u012783994/article/details/131661617 #### 原理 > 利用conda创建39虚拟环境 > 安装依赖 torch==1.12.0+cu116 版本不能改 > cuda加速 #### 避坑 > number库为 numpy==1.23.5 > 时区严格遵守国际时区规则 > 中东用上海 > #### 备忘 ```shell pip install --no-cache-dir torch==1.12.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html pip install libretranslate set ARGOS_DEVICE_TYPE=cuda libretranslate --load-only de,en,es,fr,it,zh --host 0.0.0.0 --port 5000 ``` [文档](output.pdf)