提交 232321cb 编写于 作者: S shenyuhan

add user_home, fix ci

上级 40d0944e
......@@ -174,4 +174,3 @@ print(res)
目前版本支持以下模型:词法分析LAC;情感分析Senta;目标检测SSD;图像分类ResNet, MobileNet, NASNet等。
* 迁移学习: 提供了基于预训练模型的Finetune API,用户通过少量代码即可完成迁移学习,包括BERT/ERNIE文本分类、序列标注、图像分类迁移等。
......@@ -19,10 +19,10 @@ if __name__ == "__main__":
results = lac.lexical_analysis(data=inputs, use_gpu=True, batch_size=10)
for result in results:
if six.PY2:
print(
json.dumps(result['word'], encoding="utf8", ensure_ascii=False))
print(
json.dumps(result['tag'], encoding="utf8", ensure_ascii=False))
print(json.dumps(
result['word'], encoding="utf8", ensure_ascii=False))
print(json.dumps(
result['tag'], encoding="utf8", ensure_ascii=False))
else:
print(result['word'])
print(result['tag'])
......@@ -21,7 +21,7 @@ if __name__ == "__main__":
results[index]["text"] = text
for index, result in enumerate(results):
if six.PY2:
print(
json.dumps(results[index], encoding="utf8", ensure_ascii=False))
print(json.dumps(
results[index], encoding="utf8", ensure_ascii=False))
else:
print(results[index])
......@@ -80,8 +80,10 @@ class ConfigCommand(BaseCommand):
@staticmethod
def set_log_level(level):
if level not in ["CRITICAL", "FATAL", "ERROR", "WARN",
"WARNING", "INFO", "DEBUG", "NOTSET"]:
if level not in [
"CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO",
"DEBUG", "NOTSET"
]:
print("Allowed values include: "
"CRITICAL, FATAL, ERROR, WARN, WARNING, INFO, DEBUG, NOTSET")
return
......
......@@ -14,6 +14,7 @@
# limitations under the License.
import os
# TODO: Change dir.py's filename, this naming rule is not qualified
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册