PageSourceSearch

https://playtorch.dev/assets/js/6bcd8448.422a6832.js

js playtorch.dev collected 2026-10-07 09:38:01 UTC 16,785 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2289],{52659:(e,t,a)=>{a.d(t,{Z:()=>l});var r,o=a(67294);function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},n.apply(this,arguments)}const l=e=>{let{title:t,titleId:a,...l}=e;return o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:119.664,height:40,viewBox:"0 0 119.664 40","aria-labelledby":a},l),void 0===t?o.createElement("title",{id:a},"Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917"):t?o.createElement("title",{id:a},t):null,o.createElement("path",{d:"M110.135 0H9.535c-.367 0-.73 0-1.095.002-.306.002-.61.008-.919.013A13.215 13.215 0 0 0 5.517.19a6.665 6.665 0 0 0-1.9.627 6.438 6.438 0 0 0-1.62 1.18A6.258 6.258 0 0 0 .82 3.617a6.601 6.601 0 0 0-.625 1.903 12.993 12.993 0 0 0-.179 2.002c-.01.307-.01.615-.015.921V31.56c.005.31.006.61.015.921a12.992 12.992 0 0 0 .18 2.002 6.588 6.588 0 0 0 .624 1.905A6.208 6.208 0 0 0 1.998 38a6.274 6.274 0 0 0 1.618 1.179 6.7 6.7 0 0 0 1.901.63 13.455 13.455 0 0 0 2.004.177c.31.007.613.011.919.011.366.002.728.002 1.095.002h100.6c.36 0 .724 0 1.084-.002.304 0 .617-.004.922-.01a13.279 13.279 0 0 0 2-.178 6.804 6.804 0 0 0 1.908-.63A6.277 6.277 0 0 0 117.666 38a6.395 6.395 0 0 0 1.182-1.614 6.604 6.604 0 0 0 .619-1.905 13.506 13.506 0 0 0 .185-2.002c.004-.31.004-.61.004-.921.008-.364.008-.725.008-1.094V9.536c0-.366 0-.73-.008-1.092 0-.306 0-.614-.004-.92a13.507 13.507 0 0 0-.185-2.003 6.618 6.618 0 0 0-.62-1.903 6.466 6.466 0 0 0-2.798-2.8 6.768 6.768 0 0 0-1.908-.627 13.044 13.044 0 0 0-2-.176c-.305-.005-.618-.011-.922-.013-.36-.002-.725-.002-1.084-.002Z",style:{fill:"#a6a6a6"}}),r||(r=o.createElement("path",{d:"M8.445 39.125c-.305 0-.602-.004-.904-.01a12.687 12.687 0 0 1-1.87-.164 5.884 5.884 0 0 1-1.656-.548 5.406 5.406 0 0 1-1.397-1.016 5.32 5.32 0 0 1-1.02-1.397 5.722 5.722 0 0 1-.544-1.657 12.414 12.414 0 0 1-.166-1.875c-.007-.21-.015-.913-.015-.913v-23.1s.009-.692.015-.895a12.37 12.37 0 0 1 .165-1.872 5.755 5.755 0 0 1 .544-1.662 5.373 5.373 0 0 1 1.015-1.398 5.565 5.565 0 0 1 1.402-1.023 5.823 5.823 0 0 1 1.653-.544A12.586 12.586 0 0 1 7.543.887l.902-.012h102.769l.913.013a12.385 12.385 0 0 1 1.858.162 5.938 5.938 0 0 1 1.671.548 5.594 5.594 0 0 1 2.415 2.42 5.763 5.763 0 0 1 .535 1.649 12.995 12.995 0 0 1 .174 1.887c.003.283.003.588.003.89.008.375.008.732.008 1.092v20.929c0 .363 0 .718-.008 1.075 0 .325 0 .623-.004.93a12.731 12.731 0 0 1-.17 1.853 5.739 5.739 0 0 1-.54 1.67 5.48 5.48 0 0 1-1.016 1.386 5.413 5.413 0 0 1-1.4 1.022 5.862 5.862 0 0 1-1.668.55 12.542 12.542 0 0 1-1.869.163c-.293.007-.6.011-.897.011l-1.084.002Z"})),o.createElement("g",{"data-name":"<Group>"},o.createElement("g",{"data-name":"<Group>"},o.createElement("path",{"data-name":"<Path>",d:"M24.769 20.3a4.949 4.949 0 0 1 2.356-4.151 5.066 5.066 0 0 0-3.99-2.158c-1.68-.176-3.308 1.005-4.164 1.005-.872 0-2.19-.988-3.608-.958a5.315 5.315 0 0 0-4.473 2.728c-1.934 3.348-.491 8.269 1.361 10.976.927 1.325 2.01 2.805 3.428 2.753 1.387-.058 1.905-.885 3.58-.885 1.658 0 2.144.885 3.59.852 1.489-.025 2.426-1.332 3.32-2.67a10.962 10.962 0 0 0 1.52-3.092 4.782 4.782 0 0 1-2.92-4.4ZM22.037 12.21a4.872 4.872 0 0 0 1.115-3.49 4.957 4.957 0 0 0-3.208 1.66A4.636 4.636 0 0 0 18.8 13.74a4.1 4.1 0 0 0 3.237-1.53Z",style:{fill:"#fff"}})),o.createElement("path",{d:"M42.302 27.14H37.57l-1.137 3.356h-2.005l4.484-12.418h2.083l4.483 12.418h-2.039Zm-4.243-1.55h3.752l-1.85-5.446h-.051ZM55.16 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484H46.63V21.442h1.8v1.506h.033a3.212 3.212 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622Zm-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.393-1.197 2.393-3.046ZM65.125 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484h-1.859V21.442h1.799v1.506h.034a3.212 3.212 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622Zm-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.392-1.197 2.392-3.046ZM71.71 27.036c.138 1.232 1.334 2.04 2.97 2.04 1.566 0 2.693-.808 2.693-1.919 0-.964-.68-1.54-2.29-1.936l-1.609-.388c-2.28-.55-3.339-1.617-3.339-3.348 0-2.142 1.867-3.614 4.519-3.614 2.624 0 4.423 1.472 4.483 3.614h-1.876c-.112-1.239-1.136-1.987-2.634-1.987s-2.521.757-2.521 1.858c0 .878.654 1.395 2.255 1.79l1.368.336c2.548.603 3.606 1.626 3.606 3.443 0 2.323-1.85 3.778-4.793 3.778-2.754 0-4.614-1.42-4.734-3.667ZM83.346 19.3v2.142h1.722v1.472h-1.722v4.991c0 .776.345 1.137 1.102 1.137a5.808 5.808 0 0 0 .611-.043v1.463a5.104 5.104 0 0 1-1.032.086c-1.833 0-2.548-.689-2.548-2.445v-5.189h-1.316v-1.472h1.316V19.3ZM86.065 25.97c0-2.849 1.678-4.639 4.294-4.639 2.625 0 4.295 1.79 4.295 4.639 0 2.856-1.661 4.638-4.295 4.638-2.633 0-4.294-1.782-4.294-4.638Zm6.695 0c0-1.954-.895-3.108-2.401-3.108s-2.4 1.162-2.4 3.108c0 1.962.894 3.106 2.4 3.106s2.401-1.144 2.401-3.106ZM96.186 21.442h1.773v1.541h.043a2.16 2.16 0 0 1 2.177-1.635 2.866 2.866 0 0 1 .637.069v1.738a2.598 2.598 0 0 0-.835-.112 1.873 1.873 0 0 0-1.937 2.083v5.37h-1.858ZM109.384 27.837c-.25 1.643-1.85 2.771-3.898 2.771-2.634 0-4.269-1.764-4.269-4.595 0-2.84 1.644-4.682 4.19-4.682 2.506 0 4.08 1.72 4.08 4.466v.637h-6.394v.112a2.358 2.358 0 0 0 2.436 2.564 2.048 2.048 0 0 0 2.09-1.273Zm-6.282-2.702h4.526a2.177 2.177 0 0 0-2.22-2.298 2.292 2.292 0 0 0-2.306 2.298Z",style:{fill:"#fff"}})),o.createElement("g",{"data-name":"<Group>"},o.createElement("path",{d:"M37.826 8.731a2.64 2.64 0 0 1 2.808 2.965c0 1.906-1.03 3.002-2.808 3.002h-2.155V8.73Zm-1.228 5.123h1.125a1.876 1.876 0 0 0 1.967-2.146 1.881 1.881 0 0 0-1.967-2.134h-1.125ZM41.68 12.444a2.133 2.133 0 1 1 4.248 0 2.134 2.134 0 1 1-4.247 0Zm3.334 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55ZM51.573 14.698h-.922l-.93-3.317h-.07l-.927 3.317h-.913l-1.242-4.503h.902l.806 3.436h.067l.926-3.436h.852l.926 3.436h.07l.803-3.436h.889ZM53.854 10.195h.855v.715h.066a1.348 1.348 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.888ZM59.094 8.437h.888v6.26h-.888ZM61.218 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0Zm3.333 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55ZM66.4 13.424c0-.81.604-1.278 1.676-1.344l1.22-.07v-.389c0-.475-.315-.744-.922-.744-.497 0-.84.182-.939.5h-.86c.09-.773.818-1.27 1.84-1.27 1.128 0 1.765.563 1.765 1.514v3.077h-.855v-.633h-.07a1.515 1.515 0 0 1-1.353.707 1.36 1.36 0 0 1-1.501-1.348Zm2.895-.384v-.377l-1.1.07c-.62.042-.9.253-.9.65 0 .405.351.64.834.64a1.062 1.062 0 0 0 1.166-.983ZM71.348 12.444c0-1.423.732-2.324 1.87-2.324a1.484 1.484 0 0 1 1.38.79h.067V8.437h.888v6.26h-.851v-.71h-.07a1.563 1.563 0 0 1-1.415.785c-1.145 0-1.869-.901-1.869-2.328Zm.918 0c0 .955.45 1.53 1.203 1.53.7
15 0 1.212-.583 1.212-1.526 0-.938-.468-1.53-1.212-1.53-.748 0-1.203.58-1.203 1.526ZM79.23 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0Zm3.333 0c0-.976-.438-1.547-1.208-1.547-.772 0-1.207.571-1.207 1.547 0 .984.435 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55ZM84.67 10.195h.855v.715h.066a1.348 1.348 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.889ZM93.515 9.074v1.141h.976v.749h-.976v2.315c0 .472.194.679.637.679a2.967 2.967 0 0 0 .339-.021v.74a2.916 2.916 0 0 1-.484.046c-.988 0-1.381-.348-1.381-1.216v-2.543h-.715v-.749h.715V9.074ZM95.705 8.437h.88v2.481h.07a1.386 1.386 0 0 1 1.374-.806 1.483 1.483 0 0 1 1.55 1.679v2.907h-.889V12.01c0-.72-.335-1.084-.963-1.084a1.052 1.052 0 0 0-1.134 1.142v2.63h-.888ZM104.761 13.482a1.828 1.828 0 0 1-1.95 1.303 2.045 2.045 0 0 1-2.081-2.325 2.077 2.077 0 0 1 2.076-2.352c1.253 0 2.009.856 2.009 2.27v.31h-3.18v.05a1.19 1.19 0 0 0 1.2 1.29 1.08 1.08 0 0 0 1.07-.546Zm-3.126-1.451h2.275a1.086 1.086 0 0 0-1.109-1.167 1.152 1.152 0 0 0-1.166 1.167Z",style:{fill:"#fff"}})))}},3905:(e,t,a)=>{a.r(t),a.d(t,{MDXContext:()=>s,MDXProvider:()=>d,mdx:()=>y,useMDXComponents:()=>h,withMDXComponents:()=>p});var r=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},n.apply(this,arguments)}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){o(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function c(e,t){if(null==e)return{};var a,r,o=function(e,t){if(null==e)return{};var a,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=r.createContext({}),p=function(e){return function(t){var a=h(t.components);return r.createElement(e,n({},t,{components:a}))}},h=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},d=function(e){var t=h(e.components);return r.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=h(a),d=o,m=p["".concat(l,".").concat(d)]||p[d]||u[d]||n;return a?r.createElement(m,i(i({ref:t},s),{},{components:a})):r.createElement(m,i({ref:t},s))}));function y(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:o,l[1]=i;for(var s=2;s<n;s++)l[s]=a[s];return r.createElement.apply(null,l)}return r.createElement.apply(null,a)}m.displayName="MDXCreateElement"},3883:(e,t,a)=>{a.d(t,{ZP:()=>y});var r=a(67294),o=a(86010);const n="appStoreButtonRow_wCrc",l="googlePlayButtonWrapper_Q7C8",i="googlePlayBadge_KMnZ",c="appStoreButtonWrapper_KKiy",s="appStoreBadge_xd6A";var p=a(72787),h=a(52659),d=a(77957);function u(){return r.createElement("a",{className:(0,o.Z)([l]),href:p.Z.GOOGLE_PLAY_STORE},r.createElement("img",{className:(0,o.Z)([i]),alt:"Google Play Badge",src:d.default}))}function m(){return r.createElement("a",{className:(0,o.Z)([c]),href:p.Z.APP_STORE},r.createElement(h.Z,{className:(0,o.Z)([s]),title:"Download on the App Store Badge",role:"img"}))}function y(){return r.createElement("div",{className:(0,o.Z)([n])},r.createElement(u,null),r.createElement(m,null))}},43868:(e,t,a)=>{a.d(t,{Z:()=>n});var r=a(67294);const o="surveyLinkBox_bC1w";function n(e){let{docTitle:t}=e;return r.createElement("a",{href:"https://github.com/facebookresearch/playtor
1ch/issues/new?assignees=&labels=Tutorial+Feedback&template=tutorial_feedback.yml",target:"_blank"},r.createElement("div",{className:o},"Share what we can improve!"))}},72787:(e,t,a)=>{a.d(t,{Z:()=>r});const r={APP_STORE:"https://apps.apple.com/app/playtorch/id1632121045",DISCORD:"https://discord.gg/sQkXTqEt33",GITHUB:"https://github.com/facebookresearch/playtorch",GITHUB_ISSUES:"https://github.com/facebookresearch/playtorch/issues",GOOGLE_PLAY_STORE:"https://play.google.com/store/apps/details?id=dev.playtorch",TWITTER:"https://twitter.com/playtorch",PRIVACY_POLICY:"https://www.facebook.com/privacy/policy",TERMS_OF_SERVICE:"https://www.facebook.com/legal/terms"}},46185:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>h});var r=a(83117),o=(a(67294),a(3905)),n=a(43868),l=a(3883);const i={id:"get-started",sidebar_position:1,title:"Get Started"},c=void 0,s={unversionedId:"tutorials/get-started",id:"version-0.2.4/tutorials/get-started",title:"Get Started",description:"Getting started with PlayTorch is easy. In this tutorial we will walk through the steps to build and test your first AI powered mobile prototype using PlayTorch and the Expo Snack web platform.",source:"@site/versioned_docs/version-0.2.4/tutorials/get-started.mdx",sourceDirName:"tutorials",slug:"/tutorials/get-started",permalink:"/docs/tutorials/get-started",draft:!1,editUrl:"https://github.com/facebookresearch/playtor
1ch/blob/main/website/versioned_docs/version-0.2.4/tutorials/get-started.mdx",tags:[],version:"0.2.4",sidebarPosition:1,frontMatter:{id:"get-started",sidebar_position:1,title:"Get Started"},sidebar:"docs",next:{title:"Expo App",permalink:"/docs/tutorials/get-started-expo-app"}},p={},h=[{value:"Download the PlayTorch app",id:"download-the-playtorch-app",level:2},{value:"Create Your First Prototype",id:"create-your-first-prototype",level:2},{value:"Next steps",id:"next-steps",level:2},{value:"Give us feedback",id:"give-us-feedback",level:2}],d={toc:h};function u(e){let{components:t,...a}=e;return(0,o.mdx)("wrapper",(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)("p",null,"Getting started with PlayTorch is easy. In this tutorial we will walk through the steps to build and test your first AI powered mobile prototype using PlayTorch and the Expo Snack web platform."),(0,o.mdx)("p",null,"If you're interested in creating a new PlayTorch app and building it locally or integrating PlayTorch into an existing project check out the other pages in the sidebar under Getting Started."),(0,o.mdx)("h2",{id:"download-the-playtorch-app"},"Download the PlayTorch app"),(0,o.mdx)("p",null,"The first step is to download the PlayTorch app to your Android or iOS device. This app will enable us to run your mobile AI powered mobile prototype by scanning a QR code in the PlayTorch app."),(0,o.mdx)(l.ZP,{mdxType:"AppStoreButtons"}),(0,o.mdx)("h2",{id:"create-your-first-prototype"},"Create Your First Prototype"),(0,o.mdx)("p",null,"Next we will create a new React Native app using the Expo Snack web-based editor."),(0,o.mdx)("ol",null,(0,o.mdx)("li",{parentName:"ol"},"Open the ",(0,o.mdx)("a",{parentName:"li",href:"/snack/"},"PlayTorch starter snack")," in a new browser window."),(0,o.mdx)("li",{parentName:"ol"},'Open the PlayTorch app on your mobile device and click "Scan QR Code".'),(0,o.mdx)("li",{parentName:"ol"},"Scan the QR code displayed in the Expo Snack sidebar."),(0,o.mdx)("li",{parentName:"ol"},'Now change the line that starts with "Change this example PlayTorch Snack code..." to say "Hello World!"'),(0,o.mdx)("li",{parentName:"ol"},"Click the Save button and watch as your app reloads automatically with the new changes.")),(0,o.mdx)("p",null,"Note: you can exit out of your app at any time by pressing and holding with two fingers on the screen."),(0,o.mdx)("h2",{id:"next-steps"},"Next steps"),(0,o.mdx)("p",null,"You now have everything you need to build a mobile prototype using AI!"),(0,o.mdx)("p",null,"To explore some ways you can start using AI in your app, check out the Tutorials section in the sidebar. Each tutorial walks through the steps required to integrate and use a machine learning model, and you can test out each of the tutorials as snacks in the PlayTorch app just like the new snack you created."),(0,o.mdx)("p",null,"PlayTorch is in beta. Your feedback will help us improve tremendously. Please file issues and share ideas on GitHub."),(0,o.mdx)("p",null,"Show us what you've made with PlayTorch by tagging #playtorch in your social media posts too."),(0,o.mdx)("h2",{id:"give-us-feedback"},"Give us feedback"),(0,o.mdx)(n.Z,{docTitle:"Get Started",mdxType:"SurveyLinkButton"}))}u.isMDXComponent=!0},86010:(e,t,a)=>{function r(e){var t,a,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=r(e[t]))&&(o&&(o+=" "),o+=a);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,a=0,o="";a<arguments.length;)(e=arguments[a++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}a.d(t,{Z:()=>o})},77957:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});const r=a.p+"assets/images/google_play_badge-f902960a94878ee0da671fc4d3dbc8c0.png"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.