Comments (2)
First, you have to install the package
pip install rasa-host
Then, you can run the following python code:
from RasaHost import host
host.run()
and the app should be running on http://localhost:5005
from rasahost.
my code
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.agent import Agent
interpreter = RasaNLUInterpreter('models/current/nlu')
agent = Agent.load("models/dialogue", interpreter=interpreter)
from RasaHost import host
host.nlu_path = r"/home/ajinkz/Desktop/RASA/rasa_DEMO_1-2-19/nlu.md"
host.stories_path = r"/home/ajinkz/Desktop/RASA/rasa_DEMO_1-2-19/stories.md"
host.domain_path = r"/home/ajinkz/Desktop/RASA/rasa_DEMO_1-2-19/domain.yml"
host.agent = agent
if __name__ == '__main__':
host.run()
Error
2019-02-18 18:02:49.064460: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-02-18 18:02:58 ERROR RasaHost - Traceback (most recent call last):
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/RasaHost/__init__.py", line 50, in register_channels
if self.channels:
AttributeError: 'RasaHost' object has no attribute 'channels'
* Serving Flask app "RasaHost" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "rasahost.py", line 21, in <module>
host.run()
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/RasaHost/__init__.py", line 66, in run
self.flask.run(self.host, self.port)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/flask/app.py", line 943, in run
run_simple(host, port, self, **options)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/werkzeug/serving.py", line 814, in run_simple
inner()
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/werkzeug/serving.py", line 774, in inner
fd=fd)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/werkzeug/serving.py", line 660, in make_server
passthrough_errors, ssl_context, fd=fd)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/site-packages/werkzeug/serving.py", line 577, in __init__
self.address_family), handler)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/socketserver.py", line 456, in __init__
self.server_bind()
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/http/server.py", line 136, in server_bind
socketserver.TCPServer.server_bind(self)
File "/home/ajinkz/miniconda3/envs/rasa3/lib/python3.6/socketserver.py", line 470, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
my directory structure
├── actions.py
├── credentials.yml
├── domain.yml
├── endpoints.yml
├── models
│ ├── current
│ │ └── nlu
│ │ ├── checkpoint
│ │ ├── crf_model.pkl
│ │ ├── intent_classifier_sklearn.pkl
│ │ ├── intent_classifier_tensorflow_embedding.ckpt.data-00000-of-00001
│ │ ├── intent_classifier_tensorflow_embedding.ckpt.index
│ │ ├── intent_classifier_tensorflow_embedding.ckpt.meta
│ │ ├── intent_classifier_tensorflow_embedding_encoded_all_intents.pkl
│ │ ├── intent_classifier_tensorflow_embedding_inv_intent_dict.pkl
│ │ ├── intent_featurizer_count_vectors.pkl
│ │ ├── metadata.json
│ │ ├── regex_featurizer.json
│ │ └── training_data.json
│ └── dialogue
│ ├── domain.json
│ ├── domain.yml
│ ├── policy_0_KerasPolicy
│ │ ├── featurizer.json
│ │ ├── keras_model.h5
│ │ └── keras_policy.json
│ ├── policy_1_FallbackPolicy
│ │ └── fallback_policy.json
│ ├── policy_2_MemoizationPolicy
│ │ ├── featurizer.json
│ │ └── memorized_turns.json
│ ├── policy_3_FormPolicy
│ │ ├── featurizer.json
│ │ └── memorized_turns.json
│ └── policy_metadata.json
├── nlu_config.yml
├── nlu.md
├── out.log
from rasahost.
Related Issues (6)
- no attribute 'channels' HOT 1
- Does this support the latest RASA version? HOT 2
- How do i start this rasa-host HOT 1
- in handle_text output = host.agent.handle_text(message, sender_id=sender_id) AttributeError: 'NoneType' object has no attribute 'handle_text' HOT 2
- How to solve Traceback AttributeError: 'NoneType' object has no attribute 'handle_text'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasahost.