Git Product home page Git Product logo

Comments (2)

yufengzhixing avatar yufengzhixing commented on June 4, 2024 1

@crownpku 我按原项目的方式试了,可以跑通代码如下:

import json
from rasa_nlu.model import Metadata, Interpreter
from rasa_nlu.config import RasaNLUConfig
metadata = Metadata.load('models/default/model_20170921-163140') # where model_directory points to the folder the model is persisted in
interpreter = Interpreter.load(metadata, RasaNLUConfig("sample_configs/config_jieba_mitie_sklearn.json"))
str=u"宝宝感冒咳嗽怎么办"
print json.dumps(interpreter.parse(str),sort_keys=True, indent=2)

个人觉得这样比提交localhost的方式方便点,欢迎指正。
非常感谢您的耐心解答!

from rasa_nlu_chi.

crownpku avatar crownpku commented on June 4, 2024

训练完模型后,启动server请直接跑:

python -m rasa_nlu.server -c sample_configs/config_jieba_mitie_sklearn.json

会默认使用最新训练的模型。
先不要用-p来指定模型,否则会出现错误。

原因是因为最新的rasa_nlu需要在curl时指定project_name.

麻煩重新pull这个项目,按照新的readme重现.

from rasa_nlu_chi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.