magenta / magenta-demos

Demonstrations of Magenta Models
Apache License 2.0
1.31k stars 417 forks source link

A.I. DUET 's piano in localhost:8080 dosen't respond #32

Closed therainmustfall closed 6 years ago

therainmustfall commented 6 years ago

Description

I folowd the guide and built the front end javascript code. The webpage of my browser's localhost:8080 first loaded the A.I. DUET page, I clicked the play button after the loading process. But when I played(clicked) the pinao notes shown below that page, It didn't respond to me at all.

Now I could figure out that after I click the piano, that page may not POST that to the server to get the predict method's results. But that's all I know and I couldn't figure out why by hitting F12 to see the GET or POST events.

in Firefox

firefox

Here is the what I had tried.

How I installed Node.js and Python with magenta, tensorflow and Flask

in the server folder and the static folder

PS C:\Users\User\Desktop\deut\server> python server.py C:\Users\User\Anaconda3\lib\site-packages\h5py__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters WARNING:tensorflow:From C:\Users\User\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives.

C:\Users\User\AppData\Roaming\npm\webpack -> C:\Users\User\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\webpack\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • webpack@1.12.14 updated 1 package in 21.784s

npm WARN deprecated autoprefixer-loader@3.2.0: Please use postcss-loader instead of autoprefixer-loader npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! node-sass@4.8.3 install C:\Users\User\Desktop\deut\static\node_modules\node-sass node scripts/install.js Cached binary found at C:\Users\User\AppData\Roaming\npm-cache\node-sass\4.8.3\win32-x64-59_binding.node node-sass@4.8.3 postinstall C:\Users\User\Desktop\deut\static\node_modules\node-sass node scripts/build.js Binary found at C:\Users\User\Desktop\deut\static\node_modules\node-sass\vendor\win32-x64-59\binding.node Testing binary Binary is fine npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN sass-loader@3.2.3 requires a peer of node-sass@^3.4.2 but none is installed. You must install peer dependencies yourself. npm WARN ai-duet@1.0.0 No description npm WARN ai-duet@1.0.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) added 527 packages in 59.881s

Hash: b86b94b068323f83d855 Version: webpack 1.15.0 Time: 5203ms Asset Size Chunks Chunk Names ./build/Main.js 232 kB 0 [emitted] Main ./build/1.js 5.4 MB 1 [emitted]

  • 422 hidden modules PS C:\Users\User\Desktop\deut\static> webpack -p Hash: cbdb4cf43fc3cb5e9e36 Version: webpack 1.15.0 Time: 17017ms Asset Size Chunks Chunk Names ./build/0.js 845 kB 0 [emitted] ./build/Main.js 78.1 kB 1 [emitted] Main
  • 422 hidden modules WARNING in ./build/0.js from UglifyJs Dropping unused variable frustumSize [./src/roll/Roll.js:108,8] Side effects in initialization of unused variable aspect [./src/roll/Roll.js:109,8] Dropping unused function scale [./src/roll/Roll.js:25,9] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/notsupported.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/notsupported.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/notsupported.css:7,0] Condition always true [./~/three/build/three.js:2,0] Dropping unused variable edges [./~/three/build/three.js:17399,0] Side effects in initialization of unused variable Tutorial [./src/ai/Tutorial.js:60,13] Side effects in initialization of unused variable About [./src/interface/About.js:33,13] Side effects in initialization of unused variable Note [./src/keyboard/Note.js:19,13] Side effects in initialization of unused variable RollNote [./src/roll/RollNote.js:24,13] Condition always true [/source/AudioKeys.js:15,0] Condition always true [./~/buckets-js/dist/buckets.min.js:2,15] Condition always true [./~/midiconvert/build/MidiConvert.js:1,15] Condition always true [./~/pepjs/dist/pep.js:7,0] Condition always true [./~/startaudiocontext/StartAudioContext.js:8,0] Dropping unreachable code [./~/startaudiocontext/StartAudioContext.js:10,3] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/about.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/about.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/about.css:7,0] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/glow.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/glow.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/glow.css:7,0] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/keyboard.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/keyboard.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/keyboard.css:7,0] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/tutorial.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/tutorial.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/tutorial.css:7,0] Condition always true [./~/webmidi/webmidi.min.js:31,1635] WARNING in ./build/Main.js from UglifyJs Side effects in initialization of unused variable main [./src/FeatureTest.js:28,9] Condition always false [./~/style-loader/addStyles.js:24,0] Dropping unreachable code [./~/style-loader/addStyles.js:25,0] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/splash.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/splash.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/splash.css:7,0] Condition always true [./~/domready/ready.js:6,0] Dropping unreachable code [./~/domready/ready.js:7,0] Condition always false [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/main.css:10,0] Dropping unreachable code [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/main.css:12,0] Side effects in initialization of unused variable update [./~/style-loader!./~/css-loader!./~/autoprefixer-loader!./~/sass-loader!./style/main.css:7,0]`
adarob commented 6 years ago

@tambien

liujiaheng commented 6 years ago

Ai-jam-js works. Ai-jam-js is similar to ai-jam.

tambien commented 6 years ago

Might be an issue with installation correct versions for all the modules. try removing the node_modules folder, remove all of the ^ from the package.json file. That will install the exact version of that dependency instead of any version which satisfies that semver. So for example edit "tone": "^0.9.0" to read "tone": "0.9.0". Then npm install and follow instructions to rebuild.

Let me know if that works for you.

adarob commented 6 years ago

FYI, we are removing the copy of AI Duet from our repo so we can make updates to one central location. Please re-open this issue at https://github.com/googlecreativelab/aiexperiments-ai-duet.

Thanks!