googlecreativelab / aiexperiments-ai-duet

A piano that responds to you.
https://aiexperiments.withgoogle.com/ai-duet
1.63k stars 283 forks source link

Changes got overwritten after merge and therefore doesn't work again #5

Closed camiblanch closed 7 years ago

camiblanch commented 7 years ago

Commit f333126 overwrote the changes merged in 6a573d1. Now it has the same problem again that was originally solved from PR #1

almostimplemented commented 7 years ago

That commit included a sys.path.append('./third_party'). If you still have magenta installed, you're going to hit the same namespace collision. (note that magenta was removed from requirements.txt).

I think the right solution is to include virtualenv and/or docker installation instructions. I would be happy to write a Dockerfile this evening to contribute.

python273 commented 7 years ago

I have created Dockerfile, but it doesn't work without these changes: need to move /server/third_party/magenta/ to /server/ and fix paths in predict.py

https://gist.github.com/python273/c2a0376023e02d21e01eb18449b694fe

ghost commented 7 years ago

I run the server, and I get this as soon as I pressed one piano note:

 * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
[2016-11-17 02:42:38,470] ERROR in app: Exception on /predict [POST]
Traceback (most recent call last):
  File "/Users/saint/tensorflow/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/saint/tensorflow/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/saint/tensorflow/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/saint/tensorflow/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/saint/tensorflow/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "server.py", line 39, in predict
    ret_midi = generate_midi(midi_data, duration)
  File "/Users/saint/aiexperiments-ai-duet-master/server/predict.py", line 52, in generate_midi
    generate_response = basic_generator.generate(generate_request)
TypeError: generate() takes exactly 3 arguments (2 given)
127.0.0.1 - - [17/Nov/2016 02:42:38] "POST /predict?duration=1.1015873015873012&generator=pop HTTP/1.1" 500 -