未验证 提交 256f13ca 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

Merge pull request #2269 from yt605155624/r1.1

[cherry-pick][r.1.1]fix stats bugs
......@@ -125,9 +125,11 @@ class StatsCommand:
"Here is the list of {} pretrained models released by PaddleSpeech that can be used by command line and python API"
.format(self.task.upper()))
self.show_support_models(pretrained_models)
return True
except BaseException:
print("Failed to get the list of {} pretrained models.".format(
self.task.upper()))
return False
# Dynamic import when running specific command
......
......@@ -18,7 +18,6 @@ from typing import List
import uvicorn
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from prettytable import PrettyTable
from starlette.middleware.cors import CORSMiddleware
......@@ -46,6 +45,7 @@ app.add_middleware(
allow_methods=["*"],
allow_headers=["*"])
@cli_server_register(
name='paddlespeech_server.start', description='Start the service')
class ServerExecutor(BaseExecutor):
......@@ -177,7 +177,7 @@ class ServerStatsExecutor():
logger.info(
"Here is the table of {} static pretrained models supported in the service.".
format(self.task.upper()))
self.show_support_models(pretrained_models)
self.show_support_models(static_pretrained_models)
return True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册