diff --git a/demos/audio_searching/README.md b/demos/audio_searching/README.md index 676b13614..2b417c0eb 100644 --- a/demos/audio_searching/README.md +++ b/demos/audio_searching/README.md @@ -75,6 +75,7 @@ Then to start the system server, and it provides HTTP backend services. Then start the server with Fastapi. ```bash + export PYTHONPATH=$PYTHONPATH:./src python src/main.py ``` @@ -126,8 +127,8 @@ Then to start the system server, and it provides HTTP backend services. Navigate to 127.0.0.1:8068 in your browser to access the front-end interface - Note: If the browser and the service are not on the same machine, then the IP needs to be changed to the IP of the machine where the service is located, and the corresponding API_URL in docker-comemater. yaml needs to be changed and the service can be restarted - + Note: If the browser and the service are not on the same machine, then the IP needs to be changed to the IP of the machine where the service is located, and the corresponding API_URL in docker-compose.yaml needs to be changed and the service can be restarted + - Insert data Download the data and decompress it to a path named /home/speech/data. Then enter /home/speech/data in the address bar of the upload page to upload the data diff --git a/demos/audio_searching/README_cn.md b/demos/audio_searching/README_cn.md index 6ba559c18..d822c00df 100644 --- a/demos/audio_searching/README_cn.md +++ b/demos/audio_searching/README_cn.md @@ -77,6 +77,7 @@ ffce340b3790 minio/minio:RELEASE.2020-12-03T00-03-10Z "/usr/bin/docker-ent…" 启动用 Fastapi 构建的服务 ```bash + export PYTHONPATH=$PYTHONPATH:./src python src/main.py ``` @@ -128,7 +129,7 @@ ffce340b3790 minio/minio:RELEASE.2020-12-03T00-03-10Z "/usr/bin/docker-ent…" 在浏览器中输入 127.0.0.1:8068 访问前端页面 - 注:如果浏览器和服务不在同一台机器上,那么 IP需要修改成服务所在的机器 IP,并且docker-compose.yaml 中相应的 API_URL 也要修改,并重新起服务即可 + 注:如果浏览器和服务不在同一台机器上,那么 IP 需要修改成服务所在的机器 IP,并且docker-compose.yaml 中相应的 API_URL 也要修改,并重新起服务即可 - 上传音频 diff --git a/demos/audio_searching/src/operations/count.py b/demos/audio_searching/src/operations/count.py index eb4ba89d2..9a1f42082 100644 --- a/demos/audio_searching/src/operations/count.py +++ b/demos/audio_searching/src/operations/count.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import sys -sys.path.append("..") + from config import DEFAULT_TABLE from logs import LOGGER diff --git a/demos/audio_searching/src/operations/drop.py b/demos/audio_searching/src/operations/drop.py index 44a6ea0d2..f8278ddd0 100644 --- a/demos/audio_searching/src/operations/drop.py +++ b/demos/audio_searching/src/operations/drop.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import sys -sys.path.append("..") + from config import DEFAULT_TABLE from logs import LOGGER diff --git a/demos/audio_searching/src/operations/load.py b/demos/audio_searching/src/operations/load.py index 5e70aa097..7a295bf34 100644 --- a/demos/audio_searching/src/operations/load.py +++ b/demos/audio_searching/src/operations/load.py @@ -14,10 +14,9 @@ import os import sys +from config import DEFAULT_TABLE from diskcache import Cache from encode import get_audio_embedding -sys.path.append("..") -from config import DEFAULT_TABLE from logs import LOGGER diff --git a/demos/audio_searching/src/operations/search.py b/demos/audio_searching/src/operations/search.py index 253ab05a2..9cf48abf9 100644 --- a/demos/audio_searching/src/operations/search.py +++ b/demos/audio_searching/src/operations/search.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import sys -sys.path.append("..") + from config import DEFAULT_TABLE from config import TOP_K from encode import get_audio_embedding