Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Build a PWA with Azure ML built-in
Search
Michelle Sandford
January 15, 2022
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Build a PWA with Azure ML built-in
This is just the code editing of the template PWA scaffolded with VUE
Michelle Sandford
January 15, 2022
Transcript
19 slides
Has Your Puppy Joined The Dark Side?
Side-by-side deck – How to Build a PWA with Azure
ML Built-in
Scaffold the App
Has Your Puppy Joined the Dark Side?
App.vue
Display an image and a button to switch it
Create a Placeholder for the data <script> export default {
name: "DetectImage", props: { msg: String }, data() { return { image: 0, numImages: 21 }; }, </script>
Return the index of an image <script> export default {
name: "DetectImage", props: { msg: String }, data() { return { image: 0, numImages: 21 }; }, computed: { getImgIndex() { return this.image.toString(); }, disable() { if (this.image == this.numImages) { return true; } else return false; } }, </script>
Capture user interaction computed: { getImgIndex() { return this.image.toString(); },
disable() { if (this.image == this.numImages) { return true; } else return false; } }, methods: { next() { this.image++; this.predictions = []; setTimeout(this.predict, 500); } } </script>
Bling bling baby <style scoped> h3 { margin: 40px 0
0; } .image { min-height: 500px; max-height: 500px; max-width: 100%; } .button { width: 200px; height: 50px; border-radius: 5px; background-color: blueviolet; color: white; font-size: 20pt; margin: 10px; } .button:disabled, .button[disabled] { border: 1px solid #999999; background-color: #cccccc; color: #666666; } </style>
json "dependencies": { "core-js": "^3.6.5", "register-service-worker": "^1.7.1", "customvision-tfjs": "^1.0.1", "vue":
"^3.0.0" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-pwa": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-standard": "^5.1.2", "babel-eslint": "^10.1.0", "eslint": "^6.7.2", "eslint-plugin-import": "^2.20.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.0", "raw-loader": "^4.0.0", "webpack-cli": "^3.3.10" "eslint-plugin-vue": "^7.0.0" },
customvision-tfjs
Web.config.js
Data elements
Async mounted
Async predict
Async predict
Web.config
Has Your Puppy Joined The Dark Side?
More Decks by Michelle Sandford
See All by Michelle Sandford
Keynote for Programmable.Tech 2024
msandfor
0
91
Amplifying Your Tech Career: Showcasing Your Work and Building Your Brand
msandfor
0
76
Build a Static Web App (PWA) with Custom Vision
msandfor
1
310
LiveOps_Best_Practices.pdf
msandfor
0
130
Techorama - Rise of the Tech Influencer
msandfor
0
200
Has your puppy joined the dark side?
msandfor
0
290
¿Tu cachorro se ha unido al lado oscuro?
msandfor
0
140
Well Connected
msandfor
0
130
Show Your Work - Using Data Science to Peek inside the Black Box
msandfor
0
150
Other Decks in Programming
See All in Programming
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
420
はじめてのKubernetesコントリビューション
nasa9084
0
320
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
LLM 101
dalinaum
0
530
Distance field of Julia set
kinakomoti321
0
330
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
Building the Perfect Custom Keyboard
takai
2
970
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
Prompt Engineering for Job Search
mfonobong
0
610
The Limits of Empathy - UXLibs8
cassininazir
2
800
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
Thoughts on Productivity
jonyablonski
76
5.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
The untapped power of vector embeddings
frankvandijk
2
2k