Slide 1

Slide 1 text

Build and deploy a Gemini Chatbot with UI From zero to my own hero Montréal Stefania Pecore, Women Techmakers Montréal Lead

Slide 2

Slide 2 text

Gemini that will help you when you are lazy! Streamlit that is your ally (especially if you suck at web dev) Google Cloud Platform GCP Cloud Build and Cloud Run Docker and GCP Artifact Registry Who are you going to meet today?

Slide 3

Slide 3 text

Who Am I? ● University degree in linguistics and foreign languages, Ph.D. in AI ● Applied AI in several industries: ○ Research and Teaching (UBS, NRC Italy and Canada, UOttawa) ○ E-Commerce (Soledis Shopify Vannes) ○ Home automation (STIIMA Milan) ○ Video Games (among others: Square Enix, Behavior Interactive) ○ BioTech-Health (Sardo-Onco) ● Ambassador, mentor and AI expert elected by: ○ Google Women Techmakers ○ Women In AI ○ Women In Games ○ Technovation Montreal ○ UNESCO Women4Ethical AI

Slide 4

Slide 4 text

Great but… I was scared of the step following the pure data science part My face when I heard “deployment”

Slide 5

Slide 5 text

Montréal Google Cloud Platform can help!

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

What are we building? A chatbot for lonely people trying to organize a vacation through Q+A with an imaginary friend and reading guide docs (PDF)

Slide 8

Slide 8 text

Colab POC - logic

Slide 9

Slide 9 text

Colab POC - Streamlit

Slide 10

Slide 10 text

Colab POC - Streamlit

Slide 11

Slide 11 text

Colab POC - Streamlit

Slide 12

Slide 12 text

Now let’s go to the GCP side … The Spooky Deployment! Montréal

Slide 13

Slide 13 text

GCP Cloud Shell Editor

Slide 14

Slide 14 text

Why is Docker important? ● Consistency and Portability ● Fully integrated with GCP: ● DevOps ● Security and Isolation

Slide 15

Slide 15 text

GCP Artifact Registry gcloud services enable artifactregistry.googleapis.com gcloud artifacts repositories create devfest2024-repo --repository-format=Docker --location=us-central1 --description="docker repository for devfest2024" Why should we care about Artifact Registry? ● Next-generation container image and package management ● Artifact Registry provides a single place to manage container images as well as language-specific packages (like Maven, npm, Python packages) and OS packages (Debian, RPM) ● Enhanced security and access control: It offers more fine-grained permissions ● Regional repositories (+++ availability and speed) ● Integration with Google Cloud services ● Improved CI/CD pipelines (Docker, Git) ● Lifecycle management

Slide 16

Slide 16 text

GCP Identity and Access Management (IAM) gcloud iam service-accounts add-iam-policy-binding [email protected] viceaccount.com --member="serviceAccount:PROJECT_NUMB [email protected]. com " --role="roles/iam.serviceAccountUser" Updated IAM policy for serviceAccount [[email protected] rviceaccount.com]. Why should we care about IAM? ● Fine-grained Access Control ● Centralized Management access across all GCP services ● Enhanced Security (Role-Based Access Control, Context-aware (Policies on IP address, time of access) ● Multi-factor authentication ● Life easier for Compliance and Auditing

Slide 17

Slide 17 text

GCP Build gcloud builds submit --region=us-central1 --tag us-central1-docker.pkg.dev/devfest2024-440819/ devfest2024-repo/devfest2024-repo:finalreally What is GCP Build? ● fully managed, serverless CI/CD ● Automation: Cloud Build automates the building, testing, and deployment of applications ● Flexibility: It supports a wide range of programming languages and build tools ● Integration: GitHub, Bitbucket, and Cloud Source Repositories ● Docker Support: push and… Build ● Scalability: Being serverless, it can handle multiple builds concurrently without requiring infrastructure management ● Cost-Effective: Users only pay for the computing resources used during builds

Slide 18

Slide 18 text

GCP Run What is GCP Run? ● fully managed compute platform that enables you to run stateless containers that are invocable via HTTP requests ● Serverless: It abstracts away infrastructure management, allowing developers to focus on writing code ● Scalability: Cloud Run automatically scales based on incoming traffic ● Language Agnostic ● Integration: Cloud Run integrates well with other Google Cloud services like Cloud Storage, Cloud SQL, and Stackdriver ● Cost-Effective: You only pay for the actual compute resources used when your application is running ● Security: It provides built-in security features like IAM policies for user authentication and authorization

Slide 19

Slide 19 text

Does this work? Montréal

Slide 20

Slide 20 text

Montréal

Slide 21

Slide 21 text

Things are not over yet - what’s next? Improve UI (multi page) Save logs with a cheap option Add the multimodality: audio and video Play with the other ways of doing this and see the differences!

Slide 22

Slide 22 text

Before we say goodbye…. Here is the code https://github.com/Jurys22/devfest2024 Editable Location

Slide 23

Slide 23 text

Job opportunity! C#, ASP.NET, HTML, CSS, Javascript, JQuery Editable Location

Slide 24

Slide 24 text

And you can see how this will go (part 2) on our YouTube channel… Wait, our?? Montréal

Slide 25

Slide 25 text

Women Techmakers is a program created by Google to celebrate International Women’s Day by highlighting the talent of women in technology. Our mission at Women Techmakers Montreal? To provide inspiration to start or continue a career in technology and help establishing a solid networking to realize your professional project beyond the day of the event. See you on April 5th!

Slide 26

Slide 26 text

Thanks ツ Dr. Stefania Pecore Questions?