SlideShare a Scribd company logo
1 of 38
© 2018 TWILIO, INC. ALL RIGHTS RESERVED.
CHATBOTS WITH TWILIO
+ TENSORFLOW.JS
© 2018 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
- Twilio Developer Evangelist
- iOS, web developer
- ML & chatbot enthusiast
‣Difference between
AI/ML/DL
‣Some ML vocabulary
‣TensorFlow 101
‣Sentiment Analysis with
TF.js and Twilio Functions
Overview
© 2018 TWILIO, INC. ALL RIGHTS RESERVED.© 2018 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
AI
ML
DL
AI, ML, DL?
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
AI
ML
DL
NLP
Natural Language Processing
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Computer Vision: AI for Visuals
AI
ML
DL
NLP
CV
Some ML vocabulary
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Weak AI:
A machine simulates
thinking, human behavior
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Strong AI:
A machine reproduces a
human behavior, can think
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
ML model:
Function with learnable parameters that map an
input to an output.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Neural Networks
Mimicking neurons in the human brain,
NNs are a set of algorithms that work to
recognize connections in a dataset
So TensorFlow?
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
• OS library released by Google Brain in 2015
• Image classification, NLP, generate music, etc.
• Python, JS, Swift, C, etc.
• TF Lite for IoT devices
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
•Toxicity model to detect toxic language
•MobileNet for object detection
•BodyPix to detect body parts
•PoseNet to detect body poses
•Node.js modules
TensorFlow.js
So Twilio?
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
const tf = require(‘tensorflow/tfjs’);
const fetch = require(‘node-fetch’);
Initialize libraries
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
exports.handler = async function(context, event, callback) {
//code
}
Handler method
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
exports.handler = async function(context, event, callback) {
//code to be added
}
const loadModel = async () => {
const url = ‘https://storage.googleapis.com/tfjs-
models/tfjs/sentiment_cnn_v1/model.json’;
const model = await tf.loadLayersModel(url);
return model;
};
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
exports.handler = async function(context, event, callback) {
//code to be added
}
//code from last slide
const getMetaData = async () => {
const metadata = await
fetch(`https://storage.googleapis.com/tfjs-
models/tfjs/sentiment_cnn_v1/metadata.json`);
return metadata.json();
}
Prepare, clean, vectorize data
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const padSequences = (sequences, metadata) => {
return sequences.map(seq => {
if(seq.length > metadata.max_len) {
seq.splice(0, seq.length - metadata.max_len);
}
if(seq.length < metadata.max_len) {
const pad = [];
for (let i = 0; i < metadata.max_len - seq.length; ++i) {
pad.push(0);
}
seq = pad.concat(seq);
}
return seq;
});
}
Equalize sequence lengths
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const predict = (text, model, metadata) => {
const trimmed = text.trim().toLowerCase().replace(/(.|,|!)/g,
'').split(' ');
Make a prediction
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const sequence = trimmed.map(word => {
const wordIndex = metadata.word_index[word];
if (typeof wordIndex === ‘undefined’) {
return 2; //oov_index
}
return wordIndex + metadata.index_from;
});
Make a prediction
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const paddedSequence =
padSequences([sequence],metadata);
const input = tf.tensor2d(paddedSequence, [1,
metadata.max_len]);
const predictOut = model.predict(input);
const score = predictOut.dataSync()[0];
predictOut.dispose();
return score;
}
Make a prediction
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const songArrayPos = [
“I was so ahead of the curve, the curve became a sphere”,
“I’ve never been a natural, all I do is try, try, try”
];
const songArrayNeutral = [
“They told me all my cages were mental, so I got wasted like
all my potential.”,
“When I felt like I was an old cardigan under someone’s bed,
you put me on and said I was your favorite."
];
//const songArrayNeg
Songs arrays
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
//code from last slide
const getSentiment = (score) => {
if (score > 0.66) {
return `Score of ${score} is Positive. Here’s a selected Swift
folklore lyric: ${songArrayPos[songArrayPos.length *
Math.random() | 0]}`;
}
else if (score > 0.4) {
return `Score of ${score} is Neutral. Here’s a selected Swift
folklore lyric: ${songArrayNeutral[songArrayNeutral.length *
Math.random() | 0]}`;
}
else {
return `Score of ${score} is Negative. Here’s a selected Swift
folklore lyric: ${songArrayNegative[songArrayNegative.length *
Math.random() | 0]}`;
}
}
Calculate sentiment
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
exports.handler = async function(context, event, callback) {
//code to be added
}
Back to the handler method
exports.handler = async function(context, event, callback) {
let twiml = new Twilio.twiml.MessagingResponse();
const prediction = event.Body.toLowerCase().trim();
const model = await loadModel();
const metadata = await getMetaData();
console.log(`${prediction}`);
let perc = predict(prediction, model, metadata);
twiml.message(getSentiment(perc));
callback(null, twiml);
}
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Buy a SMS-enabled phone #
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
Configure a Twilio # w/ Twilio Function
+1 804 375 4995
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
lsiegle@twilio.com
@lizziepika
promo: INTERNCON
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
MORE RESOURCES
Workshop
- https://github.com/elizabethsiegle/tensorflowjschatbot_workshop_interncon
- https://www.twilio.com/blog/how-positive-was-your-year-with-tensorflow-js-and-twilio
TensorFlow
-https://opensource.com/article/17/11/intro-tensorflow
- https://www.tensorflow.org/resources/learn-ml
- https://github.com/aymericdamien/TensorFlow-Examples
TensorFlow.js
- https://medium.com/codingthesmartway-com-blog/tensorflow-js-crash-course-machine-learning-for-the-we
© 2019 TWILIO, INC. ALL RIGHTS RESERVED.
HTTPS://I.IMGUR.COM/1ARAF4I.JPG
HTTPS://PBS.TWIMG.COM/MEDIA/DRHP6OTW4AAI2MJ?FORMAT=JPG&NAME=360X360
HTTPS://MIRO.MEDIUM.COM/MAX/1600/1*8GMGAAKFDI-9OHY5CA93XQ.PNG
HTTPS://I.PINIMG.COM/ORIGINALS/C8/AF/54/C8AF5423369B41548D43E6EC2044841C.GIF
Image sources

More Related Content

What's hot

Internship final presentation
Internship final presentationInternship final presentation
Internship final presentationMeme Whisper
 
Higher Education System in Germany
Higher Education System in GermanyHigher Education System in Germany
Higher Education System in GermanyPhilippxx
 
E learning - Knowledge And Curriculum
E learning - Knowledge And CurriculumE learning - Knowledge And Curriculum
E learning - Knowledge And CurriculumMamatha73
 
Japan's Educational System
Japan's Educational SystemJapan's Educational System
Japan's Educational SystemKhatski Taborada
 
Student result processing system project
Student result   processing system projectStudent result   processing system project
Student result processing system projectTanvirAhammed22
 
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...Challenges and Experiences of Students in the Virtual Classroom World: A Lite...
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...Dr. Amarjeet Singh
 
E learning resource locator, Synopsis
E learning resource locator, SynopsisE learning resource locator, Synopsis
E learning resource locator, SynopsisWipro
 
Ideal school project
Ideal school projectIdeal school project
Ideal school projectJean Bowman
 
Training and placement ppt
Training and placement pptTraining and placement ppt
Training and placement pptBhavesh Parmar
 
Final Presentation for Internship
Final Presentation for InternshipFinal Presentation for Internship
Final Presentation for Internshipjnwashburn
 
BD Jobs (Currivulam Vita (CV))-18.12.14
BD Jobs (Currivulam Vita (CV))-18.12.14BD Jobs (Currivulam Vita (CV))-18.12.14
BD Jobs (Currivulam Vita (CV))-18.12.14Sm Masum Parveg Rana
 
Curriculum Vitae (CV) Template for beginners
Curriculum Vitae (CV) Template for beginnersCurriculum Vitae (CV) Template for beginners
Curriculum Vitae (CV) Template for beginnersSAMUEL BARNABAS IFITUMI
 

What's hot (20)

Internship final presentation
Internship final presentationInternship final presentation
Internship final presentation
 
Benefits of higher education
Benefits of higher educationBenefits of higher education
Benefits of higher education
 
Higher Education System in Germany
Higher Education System in GermanyHigher Education System in Germany
Higher Education System in Germany
 
Study in Germany
Study in GermanyStudy in Germany
Study in Germany
 
E learning - Knowledge And Curriculum
E learning - Knowledge And CurriculumE learning - Knowledge And Curriculum
E learning - Knowledge And Curriculum
 
Japan's Educational System
Japan's Educational SystemJapan's Educational System
Japan's Educational System
 
Education in japan
Education in japanEducation in japan
Education in japan
 
Student result processing system project
Student result   processing system projectStudent result   processing system project
Student result processing system project
 
E Learning Objectives
E Learning ObjectivesE Learning Objectives
E Learning Objectives
 
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...Challenges and Experiences of Students in the Virtual Classroom World: A Lite...
Challenges and Experiences of Students in the Virtual Classroom World: A Lite...
 
E learning proposal
E learning proposalE learning proposal
E learning proposal
 
E learning resource locator, Synopsis
E learning resource locator, SynopsisE learning resource locator, Synopsis
E learning resource locator, Synopsis
 
Ideal school project
Ideal school projectIdeal school project
Ideal school project
 
The Importance of Higher Education
The Importance of Higher EducationThe Importance of Higher Education
The Importance of Higher Education
 
Eportfolios
EportfoliosEportfolios
Eportfolios
 
Training and placement ppt
Training and placement pptTraining and placement ppt
Training and placement ppt
 
Moodle - Learning Management System
Moodle - Learning Management SystemMoodle - Learning Management System
Moodle - Learning Management System
 
Final Presentation for Internship
Final Presentation for InternshipFinal Presentation for Internship
Final Presentation for Internship
 
BD Jobs (Currivulam Vita (CV))-18.12.14
BD Jobs (Currivulam Vita (CV))-18.12.14BD Jobs (Currivulam Vita (CV))-18.12.14
BD Jobs (Currivulam Vita (CV))-18.12.14
 
Curriculum Vitae (CV) Template for beginners
Curriculum Vitae (CV) Template for beginnersCurriculum Vitae (CV) Template for beginners
Curriculum Vitae (CV) Template for beginners
 

Similar to Chatbots with TensorFlow.js Sentiment Analysis

Intro to Text Classification with TensorFlow
Intro to Text Classification with TensorFlowIntro to Text Classification with TensorFlow
Intro to Text Classification with TensorFlowElizabeth (Lizzie) Siegle
 
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...Amazon Web Services
 
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...Amazon Web Services Korea
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quoIvano Pagano
 
Best practices iOS meetup - pmd
Best practices iOS meetup - pmdBest practices iOS meetup - pmd
Best practices iOS meetup - pmdSuyash Gupta
 
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...DevOpsDays Tel Aviv
 
Immersion Day - Estratégias e melhores práticas para ingestão de dados
Immersion Day - Estratégias e melhores práticas para ingestão de dadosImmersion Day - Estratégias e melhores práticas para ingestão de dados
Immersion Day - Estratégias e melhores práticas para ingestão de dadosAmazon Web Services LATAM
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practicejhoguet
 
Breaking the monolith (an example)
Breaking the monolith (an example)Breaking the monolith (an example)
Breaking the monolith (an example)Massimo Ferre'
 
SyliusCon - Typical pitfalls of Sylius development.pdf
SyliusCon - Typical pitfalls of Sylius development.pdfSyliusCon - Typical pitfalls of Sylius development.pdf
SyliusCon - Typical pitfalls of Sylius development.pdfŁukasz Chruściel
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureMassimo Ferre'
 
Bring Alexa to Work - ENT306 - Chicago AWS Summit
Bring Alexa to Work - ENT306 - Chicago AWS SummitBring Alexa to Work - ENT306 - Chicago AWS Summit
Bring Alexa to Work - ENT306 - Chicago AWS SummitAmazon Web Services
 
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...Amazon Web Services
 
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020Building a Streaming Microservices Architecture - Data + AI Summit EU 2020
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020Databricks
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Amazon Web Services
 
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018Amazon Web Services
 
Creative Solutions to Already Solved Problems
Creative Solutions to Already Solved ProblemsCreative Solutions to Already Solved Problems
Creative Solutions to Already Solved ProblemsGene Gotimer
 

Similar to Chatbots with TensorFlow.js Sentiment Analysis (20)

Intro to Text Classification with TensorFlow
Intro to Text Classification with TensorFlowIntro to Text Classification with TensorFlow
Intro to Text Classification with TensorFlow
 
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
 
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
 
VoiceHacks 2019
VoiceHacks 2019VoiceHacks 2019
VoiceHacks 2019
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quo
 
Best practices iOS meetup - pmd
Best practices iOS meetup - pmdBest practices iOS meetup - pmd
Best practices iOS meetup - pmd
 
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
 
Immersion Day - Estratégias e melhores práticas para ingestão de dados
Immersion Day - Estratégias e melhores práticas para ingestão de dadosImmersion Day - Estratégias e melhores práticas para ingestão de dados
Immersion Day - Estratégias e melhores práticas para ingestão de dados
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Breaking the monolith (an example)
Breaking the monolith (an example)Breaking the monolith (an example)
Breaking the monolith (an example)
 
Pro Tips for Builders on AWS
Pro Tips for Builders on AWSPro Tips for Builders on AWS
Pro Tips for Builders on AWS
 
SyliusCon - Typical pitfalls of Sylius development.pdf
SyliusCon - Typical pitfalls of Sylius development.pdfSyliusCon - Typical pitfalls of Sylius development.pdf
SyliusCon - Typical pitfalls of Sylius development.pdf
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
 
Bring Alexa to Work - ENT306 - Chicago AWS Summit
Bring Alexa to Work - ENT306 - Chicago AWS SummitBring Alexa to Work - ENT306 - Chicago AWS Summit
Bring Alexa to Work - ENT306 - Chicago AWS Summit
 
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...
Create Subtitled and Translated Videos Using AWS Services (GPSTEC319) - AWS r...
 
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020Building a Streaming Microservices Architecture - Data + AI Summit EU 2020
Building a Streaming Microservices Architecture - Data + AI Summit EU 2020
 
Moving to DevOps the Amazon Way
Moving to DevOps the Amazon WayMoving to DevOps the Amazon Way
Moving to DevOps the Amazon Way
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
 
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
An Intro to AWS for Developers: AWS Developer Workshop at Web Summit 2018
 
Creative Solutions to Already Solved Problems
Creative Solutions to Already Solved ProblemsCreative Solutions to Already Solved Problems
Creative Solutions to Already Solved Problems
 

More from Elizabeth (Lizzie) Siegle

PyBay23: Understanding LangChain Agents and Tools with Twilio (or with SMS)....
PyBay23:  Understanding LangChain Agents and Tools with Twilio (or with SMS)....PyBay23:  Understanding LangChain Agents and Tools with Twilio (or with SMS)....
PyBay23: Understanding LangChain Agents and Tools with Twilio (or with SMS)....Elizabeth (Lizzie) Siegle
 
Generate Art with DALL·E 2 and Twilio MMS.pptx
Generate Art with DALL·E 2 and Twilio MMS.pptxGenerate Art with DALL·E 2 and Twilio MMS.pptx
Generate Art with DALL·E 2 and Twilio MMS.pptxElizabeth (Lizzie) Siegle
 
Segment Data Analytics for Indie Developers: KCDC 2023
Segment Data Analytics for Indie Developers: KCDC 2023Segment Data Analytics for Indie Developers: KCDC 2023
Segment Data Analytics for Indie Developers: KCDC 2023Elizabeth (Lizzie) Siegle
 
Build a Chatbot with Machine Learning Webinar
Build a Chatbot with Machine Learning WebinarBuild a Chatbot with Machine Learning Webinar
Build a Chatbot with Machine Learning WebinarElizabeth (Lizzie) Siegle
 
Improve Communication Apps with Machine Learning
Improve Communication Apps with Machine LearningImprove Communication Apps with Machine Learning
Improve Communication Apps with Machine LearningElizabeth (Lizzie) Siegle
 
Autopilot workshop for Brazil Hackathon 4/2020
Autopilot workshop for Brazil Hackathon 4/2020Autopilot workshop for Brazil Hackathon 4/2020
Autopilot workshop for Brazil Hackathon 4/2020Elizabeth (Lizzie) Siegle
 
Train to Tame: Improve Communications Apps with TensorFlow
Train to Tame: Improve Communications Apps with TensorFlowTrain to Tame: Improve Communications Apps with TensorFlow
Train to Tame: Improve Communications Apps with TensorFlowElizabeth (Lizzie) Siegle
 
Design Considerations for Building Better Bots x How Build a Facebook Messeng...
Design Considerations for Building Better Bots x How Build a Facebook Messeng...Design Considerations for Building Better Bots x How Build a Facebook Messeng...
Design Considerations for Building Better Bots x How Build a Facebook Messeng...Elizabeth (Lizzie) Siegle
 
Intro to AI and CoreML in Swift: Hear + Now 2019
Intro to AI and CoreML in Swift: Hear + Now 2019Intro to AI and CoreML in Swift: Hear + Now 2019
Intro to AI and CoreML in Swift: Hear + Now 2019Elizabeth (Lizzie) Siegle
 
Git Fetch Coffee: Thoughts on Early in Career Developer Relations
Git Fetch Coffee: Thoughts on Early in Career Developer RelationsGit Fetch Coffee: Thoughts on Early in Career Developer Relations
Git Fetch Coffee: Thoughts on Early in Career Developer RelationsElizabeth (Lizzie) Siegle
 
Chatbots & Voice Assistants London March 2019
Chatbots & Voice Assistants London March 2019Chatbots & Voice Assistants London March 2019
Chatbots & Voice Assistants London March 2019Elizabeth (Lizzie) Siegle
 
iOSCon 2019: Generate a Song from Markov Models in Swift
iOSCon 2019: Generate a Song from Markov Models in SwiftiOSCon 2019: Generate a Song from Markov Models in Swift
iOSCon 2019: Generate a Song from Markov Models in SwiftElizabeth (Lizzie) Siegle
 
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's Hackathon
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's HackathonHackCon 2017:How&Why Every Hackathon Should Be Like a Women's Hackathon
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's HackathonElizabeth (Lizzie) Siegle
 

More from Elizabeth (Lizzie) Siegle (20)

PyBay23: Understanding LangChain Agents and Tools with Twilio (or with SMS)....
PyBay23:  Understanding LangChain Agents and Tools with Twilio (or with SMS)....PyBay23:  Understanding LangChain Agents and Tools with Twilio (or with SMS)....
PyBay23: Understanding LangChain Agents and Tools with Twilio (or with SMS)....
 
Pytexas: Build ChatGPT over SMS in Python
Pytexas: Build ChatGPT over SMS in PythonPytexas: Build ChatGPT over SMS in Python
Pytexas: Build ChatGPT over SMS in Python
 
jsday 2023: Build ChatGPT over SMS in Italy
jsday 2023: Build ChatGPT over SMS in Italyjsday 2023: Build ChatGPT over SMS in Italy
jsday 2023: Build ChatGPT over SMS in Italy
 
Generate Art with DALL·E 2 and Twilio MMS.pptx
Generate Art with DALL·E 2 and Twilio MMS.pptxGenerate Art with DALL·E 2 and Twilio MMS.pptx
Generate Art with DALL·E 2 and Twilio MMS.pptx
 
Segment Data Analytics for Indie Developers: KCDC 2023
Segment Data Analytics for Indie Developers: KCDC 2023Segment Data Analytics for Indie Developers: KCDC 2023
Segment Data Analytics for Indie Developers: KCDC 2023
 
Refactr.tech.pptx
Refactr.tech.pptxRefactr.tech.pptx
Refactr.tech.pptx
 
AthenaHacks Keynote 2023
AthenaHacks Keynote 2023AthenaHacks Keynote 2023
AthenaHacks Keynote 2023
 
Build a Chatbot with Machine Learning Webinar
Build a Chatbot with Machine Learning WebinarBuild a Chatbot with Machine Learning Webinar
Build a Chatbot with Machine Learning Webinar
 
Build an AI/ML Chatbot Workshop
Build an AI/ML Chatbot WorkshopBuild an AI/ML Chatbot Workshop
Build an AI/ML Chatbot Workshop
 
Improve Communication Apps with Machine Learning
Improve Communication Apps with Machine LearningImprove Communication Apps with Machine Learning
Improve Communication Apps with Machine Learning
 
Autopilot workshop for Brazil Hackathon 4/2020
Autopilot workshop for Brazil Hackathon 4/2020Autopilot workshop for Brazil Hackathon 4/2020
Autopilot workshop for Brazil Hackathon 4/2020
 
Train to Tame: Improve Communications Apps with TensorFlow
Train to Tame: Improve Communications Apps with TensorFlowTrain to Tame: Improve Communications Apps with TensorFlow
Train to Tame: Improve Communications Apps with TensorFlow
 
Design Considerations for Building Better Bots x How Build a Facebook Messeng...
Design Considerations for Building Better Bots x How Build a Facebook Messeng...Design Considerations for Building Better Bots x How Build a Facebook Messeng...
Design Considerations for Building Better Bots x How Build a Facebook Messeng...
 
Intro to AI and CoreML in Swift: Hear + Now 2019
Intro to AI and CoreML in Swift: Hear + Now 2019Intro to AI and CoreML in Swift: Hear + Now 2019
Intro to AI and CoreML in Swift: Hear + Now 2019
 
Git Fetch Coffee: Thoughts on Early in Career Developer Relations
Git Fetch Coffee: Thoughts on Early in Career Developer RelationsGit Fetch Coffee: Thoughts on Early in Career Developer Relations
Git Fetch Coffee: Thoughts on Early in Career Developer Relations
 
Chatbots & Voice Assistants London March 2019
Chatbots & Voice Assistants London March 2019Chatbots & Voice Assistants London March 2019
Chatbots & Voice Assistants London March 2019
 
iOSCon 2019: Generate a Song from Markov Models in Swift
iOSCon 2019: Generate a Song from Markov Models in SwiftiOSCon 2019: Generate a Song from Markov Models in Swift
iOSCon 2019: Generate a Song from Markov Models in Swift
 
SF Python Holiday Party 2018
SF Python Holiday Party 2018SF Python Holiday Party 2018
SF Python Holiday Party 2018
 
Twilio Intern Final Presentation
Twilio Intern Final PresentationTwilio Intern Final Presentation
Twilio Intern Final Presentation
 
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's Hackathon
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's HackathonHackCon 2017:How&Why Every Hackathon Should Be Like a Women's Hackathon
HackCon 2017:How&Why Every Hackathon Should Be Like a Women's Hackathon
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Chatbots with TensorFlow.js Sentiment Analysis

  • 1. © 2018 TWILIO, INC. ALL RIGHTS RESERVED. CHATBOTS WITH TWILIO + TENSORFLOW.JS © 2018 TWILIO, INC. ALL RIGHTS RESERVED.
  • 2. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.© 2019 TWILIO, INC. ALL RIGHTS RESERVED. - Twilio Developer Evangelist - iOS, web developer - ML & chatbot enthusiast
  • 3. ‣Difference between AI/ML/DL ‣Some ML vocabulary ‣TensorFlow 101 ‣Sentiment Analysis with TF.js and Twilio Functions Overview
  • 4. © 2018 TWILIO, INC. ALL RIGHTS RESERVED.© 2018 TWILIO, INC. ALL RIGHTS RESERVED.
  • 5. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.© 2019 TWILIO, INC. ALL RIGHTS RESERVED. AI ML DL AI, ML, DL?
  • 6. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. AI ML DL NLP Natural Language Processing
  • 7. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Computer Vision: AI for Visuals AI ML DL NLP CV
  • 9. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Weak AI: A machine simulates thinking, human behavior
  • 10. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Strong AI: A machine reproduces a human behavior, can think
  • 11. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. ML model: Function with learnable parameters that map an input to an output.
  • 12. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Neural Networks Mimicking neurons in the human brain, NNs are a set of algorithms that work to recognize connections in a dataset
  • 14. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. • OS library released by Google Brain in 2015 • Image classification, NLP, generate music, etc. • Python, JS, Swift, C, etc. • TF Lite for IoT devices
  • 15. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. •Toxicity model to detect toxic language •MobileNet for object detection •BodyPix to detect body parts •PoseNet to detect body poses •Node.js modules TensorFlow.js
  • 17. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.
  • 18. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.
  • 19. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.
  • 20.
  • 21. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.
  • 22. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. const tf = require(‘tensorflow/tfjs’); const fetch = require(‘node-fetch’); Initialize libraries
  • 23. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. exports.handler = async function(context, event, callback) { //code } Handler method
  • 24. © 2019 TWILIO, INC. ALL RIGHTS RESERVED.
  • 25. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. exports.handler = async function(context, event, callback) { //code to be added } const loadModel = async () => { const url = ‘https://storage.googleapis.com/tfjs- models/tfjs/sentiment_cnn_v1/model.json’; const model = await tf.loadLayersModel(url); return model; };
  • 26. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. exports.handler = async function(context, event, callback) { //code to be added } //code from last slide const getMetaData = async () => { const metadata = await fetch(`https://storage.googleapis.com/tfjs- models/tfjs/sentiment_cnn_v1/metadata.json`); return metadata.json(); } Prepare, clean, vectorize data
  • 27. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const padSequences = (sequences, metadata) => { return sequences.map(seq => { if(seq.length > metadata.max_len) { seq.splice(0, seq.length - metadata.max_len); } if(seq.length < metadata.max_len) { const pad = []; for (let i = 0; i < metadata.max_len - seq.length; ++i) { pad.push(0); } seq = pad.concat(seq); } return seq; }); } Equalize sequence lengths
  • 28. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const predict = (text, model, metadata) => { const trimmed = text.trim().toLowerCase().replace(/(.|,|!)/g, '').split(' '); Make a prediction
  • 29. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const sequence = trimmed.map(word => { const wordIndex = metadata.word_index[word]; if (typeof wordIndex === ‘undefined’) { return 2; //oov_index } return wordIndex + metadata.index_from; }); Make a prediction
  • 30. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const paddedSequence = padSequences([sequence],metadata); const input = tf.tensor2d(paddedSequence, [1, metadata.max_len]); const predictOut = model.predict(input); const score = predictOut.dataSync()[0]; predictOut.dispose(); return score; } Make a prediction
  • 31. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const songArrayPos = [ “I was so ahead of the curve, the curve became a sphere”, “I’ve never been a natural, all I do is try, try, try” ]; const songArrayNeutral = [ “They told me all my cages were mental, so I got wasted like all my potential.”, “When I felt like I was an old cardigan under someone’s bed, you put me on and said I was your favorite." ]; //const songArrayNeg Songs arrays
  • 32. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. //code from last slide const getSentiment = (score) => { if (score > 0.66) { return `Score of ${score} is Positive. Here’s a selected Swift folklore lyric: ${songArrayPos[songArrayPos.length * Math.random() | 0]}`; } else if (score > 0.4) { return `Score of ${score} is Neutral. Here’s a selected Swift folklore lyric: ${songArrayNeutral[songArrayNeutral.length * Math.random() | 0]}`; } else { return `Score of ${score} is Negative. Here’s a selected Swift folklore lyric: ${songArrayNegative[songArrayNegative.length * Math.random() | 0]}`; } } Calculate sentiment
  • 33. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. exports.handler = async function(context, event, callback) { //code to be added } Back to the handler method exports.handler = async function(context, event, callback) { let twiml = new Twilio.twiml.MessagingResponse(); const prediction = event.Body.toLowerCase().trim(); const model = await loadModel(); const metadata = await getMetaData(); console.log(`${prediction}`); let perc = predict(prediction, model, metadata); twiml.message(getSentiment(perc)); callback(null, twiml); }
  • 34. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Buy a SMS-enabled phone #
  • 35. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. Configure a Twilio # w/ Twilio Function +1 804 375 4995
  • 36. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. lsiegle@twilio.com @lizziepika promo: INTERNCON
  • 37. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. MORE RESOURCES Workshop - https://github.com/elizabethsiegle/tensorflowjschatbot_workshop_interncon - https://www.twilio.com/blog/how-positive-was-your-year-with-tensorflow-js-and-twilio TensorFlow -https://opensource.com/article/17/11/intro-tensorflow - https://www.tensorflow.org/resources/learn-ml - https://github.com/aymericdamien/TensorFlow-Examples TensorFlow.js - https://medium.com/codingthesmartway-com-blog/tensorflow-js-crash-course-machine-learning-for-the-we
  • 38. © 2019 TWILIO, INC. ALL RIGHTS RESERVED. HTTPS://I.IMGUR.COM/1ARAF4I.JPG HTTPS://PBS.TWIMG.COM/MEDIA/DRHP6OTW4AAI2MJ?FORMAT=JPG&NAME=360X360 HTTPS://MIRO.MEDIUM.COM/MAX/1600/1*8GMGAAKFDI-9OHY5CA93XQ.PNG HTTPS://I.PINIMG.COM/ORIGINALS/C8/AF/54/C8AF5423369B41548D43E6EC2044841C.GIF Image sources