Repository: incubator-predictionio-site Updated Branches: refs/heads/asf-site e0c7c994d -> 10868bd12
http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/10868bd1/templates/similarproduct/quickstart/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/similarproduct/quickstart/index.html.gz b/templates/similarproduct/quickstart/index.html.gz index 7499923..0390322 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/10868bd1/templates/vanilla/dase/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/vanilla/dase/index.html.gz b/templates/vanilla/dase/index.html.gz index ce66611..a92a4a8 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/10868bd1/templates/vanilla/quickstart/index.html ---------------------------------------------------------------------- diff --git a/templates/vanilla/quickstart/index.html b/templates/vanilla/quickstart/index.html index 8ccb381..a63f407 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-5084c4e4-5bae-4c96-99b2-36ceb6e8250d">REST API</a></li> <li data-lang="python"><a href="#tab-322e0f3d-5ed0-49 24-9d49-e099ee7c4f56">Python SDK</a></li> <li data-lang="php"><a href="#tab-e5659d05-bb81-4bae-9052-36606b428bc9">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-3231e79b-b3be-4a62-8df0-6d8fae44c66d">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-9a320b8b-110c-4d70-a76e-9448672bbd3c">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-5084c4e4-5bae-4c96-99b2-36ceb6e8250d"> <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-30320a08-5a45-4508-b85c-bb953bac327a">REST API</a></li> <li data-lang="python"><a href="#tab-d6c36f7f-5529-41 05-b1b9-456450c93b3f">Python SDK</a></li> <li data-lang="php"><a href="#tab-ad7ef53f-db38-4b6d-9dfe-f4df103541b4">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-b932ed30-8c36-414b-bbaa-114d9c5c3154">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-7a5f6db1-75c6-475d-b762-faf1074f0b1e">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-30320a08-5a45-4508-b85c-bb953bac327a"> <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-322e0f3d-5ed0-4924-9d49-e099ee7c4f56"> <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-d6c36f7f-5529-4105-b1b9-456450c93b3f"> <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-e5659d05-bb81-4bae-9052-36606b428bc9"> <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-ad7ef53f-db38-4b6d-9dfe-f4df103541b4"> <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-3231e79b-b3be-4a62-8df0-6d8fae44c66d"> <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-b932ed30-8c36-414b-bbaa-114d9c5c3154"> <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-9a320b8b-110c-4d70-a76e-9448672bbd3c"> <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-7a5f6db1-75c6-475d-b762-faf1074f0b1e"> <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/10868bd1/templates/vanilla/quickstart/index.html.gz ---------------------------------------------------------------------- diff --git a/templates/vanilla/quickstart/index.html.gz b/templates/vanilla/quickstart/index.html.gz index f692454..f311900 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/10868bd1/tryit/index.html.gz ---------------------------------------------------------------------- diff --git a/tryit/index.html.gz b/tryit/index.html.gz index 454f53f..474e1d2 100644 Binary files a/tryit/index.html.gz and b/tryit/index.html.gz differ
