Repository: incubator-predictionio-site Updated Branches: refs/heads/asf-site 0fb6a435d -> 90b356966
http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/90b35696/templates/similarproduct/quickstart/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/similarproduct/quickstart/index.html.gz b/templates/similarproduct/quickstart/index.html.gz index b0e4ece..640f952 100644 Binary files a/templates/similarproduct/quickstart/index.html.gz and b/templates/similarproduct/quickstart/index.html.gz differ http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/90b35696/templates/vanilla/dase/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/vanilla/dase/index.html.gz b/templates/vanilla/dase/index.html.gz index 4baa35f..abfbd3a 100644 Binary files a/templates/vanilla/dase/index.html.gz and b/templates/vanilla/dase/index.html.gz differ http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/90b35696/templates/vanilla/quickstart/index.html ---------------------------------------------------------------------- diff --git a/templates/vanilla/quickstart/index.html b/templates/vanilla/quickstart/index.html index e9e1bf7..0bea2d4 100644 --- a/templates/vanilla/quickstart/index.html +++ b/templates/vanilla/quickstart/index.html @@ -54,17 +54,17 @@ Your system is all ready to go. </pre></td></tr></tbody></table> </div> <p>When the engine is deployed successfully and running, you should see a console message similar to the following:</p><div class="highlight shell"><table style="border-spacing: 0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre class="lineno">1 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span class="o">[</span>HttpListener] Bound to /0.0.0.0:8000 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind successful. Ready to serve. -</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve predicted results. The engine accepts JSON query with the field 'q': <code>{ "q" : "foo" }</code>. A prefix is added to the query data and return as PredictedResult.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-51d675ef-aa90-4b5d-b8f7-815071163182">REST API</a></li> <li data-lang="python"><a href="#tab-87ddf2c9-c48d-4e 42-ba3f-5a264d7e2a7c">Python SDK</a></li> <li data-lang="php"><a href="#tab-74d7f306-bf3f-43aa-8688-b468d1f074e2">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-7902d298-8bc8-439f-8bca-ed4cef09c6f6">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-9ee41b7b-310c-4ad2-b70f-41da57ac8e42">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-51d675ef-aa90-4b5d-b8f7-815071163182"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 +</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve predicted results. The engine accepts JSON query with the field 'q': <code>{ "q" : "foo" }</code>. A prefix is added to the query data and return as PredictedResult.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-7fe7360f-79c8-4366-ab7b-c12f6be7dc21">REST API</a></li> <li data-lang="python"><a href="#tab-e938d7de-8fda-45 7a-a34d-10fdad3785a9">Python SDK</a></li> <li data-lang="php"><a href="#tab-154553ab-add0-47d4-a8a9-426f791fdf17">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-e444dae7-8ef7-4d9d-8009-f155b317cd5f">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-48121888-3a61-4e33-8727-ec16bdbf34e2">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-7fe7360f-79c8-4366-ab7b-c12f6be7dc21"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 2 3</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span> -d <span class="s1">'{ "q": "foo" }'</span> http://localhost:8000/queries.json -</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-87ddf2c9-c48d-4e42-ba3f-5a264d7e2a7c"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 +</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-e938d7de-8fda-457a-a34d-10fdad3785a9"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 2 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span class="nn">predictionio</span> <span class="n">engine_client</span> <span class="o">=</span> <span class="n">predictionio</span><span class="o">.</span><span class="n">EngineClient</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="s">"http://localhost:8000"</span><span class="p">)</span> <span class="k">print</span> <span class="n">engine_client</span><span class="o">.</span><span class="n">send_query</span><span class="p">({</span> <span class="s">"q"</span><span class="p">:</span> <span class="s">"foo"</span> <span class="p">})</span> -</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-74d7f306-bf3f-43aa-8688-b468d1f074e2"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 +</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-154553ab-add0-47d4-a8a9-426f791fdf17"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 2 3 4 @@ -83,7 +83,7 @@ Your system is all ready to go. <span class="nb">print_r</span><span class="p">(</span><span class="nv">$response</span><span class="p">);</span> <span class="cp">?></span> -</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-7902d298-8bc8-439f-8bca-ed4cef09c6f6"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 +</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-e444dae7-8ef7-4d9d-8009-f155b317cd5f"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 2 3 4 @@ -96,7 +96,7 @@ Your system is all ready to go. <span class="n">response</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="nf">send_query</span><span class="p">(</span><span class="s1">'q'</span> <span class="o">=></span> <span class="s1">'foo'</span><span class="p">)</span> <span class="nb">puts</span> <span class="n">response</span> -</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-9ee41b7b-310c-4ad2-b70f-41da57ac8e42"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 +</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-48121888-3a61-4e33-8727-ec16bdbf34e2"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1 2 3 4 http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/90b35696/templates/vanilla/quickstart/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/vanilla/quickstart/index.html.gz b/templates/vanilla/quickstart/index.html.gz index 57ef35f..8434a48 100644 Binary files a/templates/vanilla/quickstart/index.html.gz and b/templates/vanilla/quickstart/index.html.gz differ http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/90b35696/tryit/index.html.gz ---------------------------------------------------------------------- diff --git a/tryit/index.html.gz b/tryit/index.html.gz index c3a54cb..f1eeb62 100644 Binary files a/tryit/index.html.gz and b/tryit/index.html.gz differ
