Loading Events

« All Events

  • This event has passed.

9 AM – Adv AI and Machine Learning – Gamas

November 7 @ 9:00 am - 10:00 am
Today We Did
  1. We learned how to display objects detected by glasses_model and coco_model
  2. We learned how to eliminate code duplication using function.
  3. We learned how to send an email using code below
    1. import smtplib
      from email.mime.text import MIMEText
      
      
      def send_email(to, subject, content):
          sender_email = "ENTER YOUR EMAIL HERE"
          app_password = "ENTER YOUR APP PASSWORD"
          msg = MIMEText(content, "plain", "utf-8")
          msg["Subject"] = subject
          msg["From"] = sender_email
          msg["To"] = to
      
          server = smtplib.SMTP("smtp.gmail.com", 587)
          server.starttls()
          server.login(sender_email, app_password)
          server.send_message(msg)
          server.quit()
      
      if __name__ == '__main__':
          send_email("ayclogic@gmail.com", "test_subject", "test_content")

       

Homework
  1. Change two_model_object_detection.py
    1. import email_tool.py into two_model_object_detection.py
    2. so when it detect “person” and it has not sent an email, send an email using function we created inside email_tool.py

Details

  • Date: November 7
  • Time:
    9:00 am - 10:00 am