Code Monkey home page Code Monkey logo

Comments (8)

hhexiy avatar hhexiy commented on July 24, 2024

You don't need to add all the paths. Have you run python setup.py develop? Please follow installation instruction here: https://github.com/stanfordnlp/cocoa#installation

Then just run the commands in the craigslist directory.

from cocoa.

Mocchaso avatar Mocchaso commented on July 24, 2024

@hhexiy
Thank you very much for replying.

Yes, I ran pip install -r requirements.txt and python setup.py develop, with reading Section: installation.
However, I failed to run all in patterns below.
What should I do to run chat_app.py...?

  • python craigslistbargain/web/chat_app.py at /mnt/c/users/(user_name)/cocoa-master
  • python web/chat_app.py at /mnt/c/users/(user_name)/cocoa-master/craigslistbargain
  • python chat_app.py at /mnt/c/users/(user_name)/cocoa-master/craigslistbargain/web

from cocoa.

hhexiy avatar hhexiy commented on July 24, 2024

See https://github.com/stanfordnlp/cocoa#web.

cd craigslistbargain;
PYTHONPATH=. python web/chat_app.py --port 5000 --config web/app_params.json --schema-path <path-to-schema> --scenarios-path <path-to-scenarios> --output <output-dir>

from cocoa.

Mocchaso avatar Mocchaso commented on July 24, 2024

I'm trying a Section: Building the bot, Use the modular approach, 2. Parse the training dialogues.

When I executed first command in this section, an error occurred.
How can I resolve this error?

Error

Traceback (most recent call last):
  File "parse_dialogue.py", line 95, in <module>
    print generator.retrieve('<start>', context_tag='<start>', tag=action, category='car', role='seller').template
  File "/mnt/c/users/administrator/my_sotuken_src/cocoa-master/cocoa/model/generator.py", line 55, in retrieve
    candidates = candidates.iloc[ids]
  File "/home/mocchaso/.pyenv/versions/anaconda3-5.3.0/envs/py27/lib/python2.7/site-packages/pandas/core/indexing.py", line 1478, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/home/mocchaso/.pyenv/versions/anaconda3-5.3.0/envs/py27/lib/python2.7/site-packages/pandas/core/indexing.py", line 2091, in _getitem_axis
    return self._get_list_axis(key, axis=axis)
  File "/home/mocchaso/.pyenv/versions/anaconda3-5.3.0/envs/py27/lib/python2.7/site-packages/pandas/core/indexing.py", line 2073, in _get_list_axis
    raise IndexError("positional indexers are out-of-bounds")
IndexError: positional indexers are out-of-bounds

from cocoa.

hhexiy avatar hhexiy commented on July 24, 2024

hmm. I cannot reproduce the error. Can you check if you pandas version is pandas=0.20.3=py27_0? I also added environment.yml here: https://github.com/stanfordnlp/cocoa/blob/master/environment.yml

from cocoa.

Mocchaso avatar Mocchaso commented on July 24, 2024

Thank you for adding environment.yml.
When I downgraded pandas from 0.23.4 to 0.20.3, I could finished executing Section: Parse the training dialogues.

However, I couldn't copy an environment from environment.yml.
The following error occurred.

$ conda env create --file environment.yml
(Other logs were outputted)
Could not find a version that satisfies the requirement cocoa==0.1

After comment out cocoa==0.1, the following error occurred.

$ conda env create --file environment.yml
(Other logs were outputted)
Could not find a version that satisfies the requirement en-core-web-sm==1.2.0

After comment out en-core-web-sm==1.2.0, command conda env create --file environment.yml succeeded.

If I execute python setup.py develop necessarily, is it ok to delete cocoa==0.1 and en-core-web-sm==1.2.0 in environment.yml?

from cocoa.

hhexiy avatar hhexiy commented on July 24, 2024

That should be fine. en-core-web-sm is the Spacy model that you can download later if needed.

from cocoa.

Mocchaso avatar Mocchaso commented on July 24, 2024

OK, thank you very much for many replying!

from cocoa.

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.