Light
Dark

How to use Vertex and Duet AI – Make Spectacular results

Duet AI in natural language to get answers to cloud questions, guidance on best practices, or code suggestions based on your comments ‘while, Vertex AI helps you build them, teach them, make them better, and watch how they’re doing on a big scale

How to use Vertex and Duet AI - Make Spectacular results

How to use Vertex AI and Duet AI to build and deploy cloud applications faster

If you are looking for a way to simplify and accelerate your cloud development process, you might want to check out Vertex AI and Duet AI, two new offerings from Google Cloud that leverage the power of generative AI.

Vertex AI

Vertex AI is like one big toolbox that does many things for making computer models. It helps you build them, teach them, make them better, and watch how they’re doing on a big scale.

You can also use it to make Codey models smarter. These models know how to write computer code quickly and well.

“Note” Google Vertex isn’t completely free. Google has some free stuff, like a trial version for certain things in the Google Cloud, but Vertex AI isn’t in that free part. Vertex AI is Google’s cool platform for machine learning.

Duet AI

Duet AI is your AI-powered collaborator that provides conversational and code assistance across Google Cloud and your IDE. You can chat with Duet AI in natural language to get answers to cloud questions, guidance on best practices, or code suggestions based on your comments. Duet AI is specially trained on Google Cloud content and supports multiple programming languages. also Google Duet AI: New Features for Gmail, Docs and Sheets, cost $30 a Month.

How to use Vertex and Duet AI - Make Spectacular results


In this blog post, we will show you how to use Vertex AI and Duet AI to build and deploy a simple web app that displays the current weather in different cities. We will use Python as our programming language and Flask as our web framework.

How to use Vertex AI and Duet AI

So, glad, you are now aware of the steps, now let explore the steps

1. Create a new project in Google Cloud Console

To get began, you want to create a new task in Google Cloud Console. You can try this via clicking at the **Create Project** button on the home page. Before that, Give your undertaking a name and a place, assignment variety and click **Create**.

2. Enable Vertex AI and Duet AI APIs

Next, you need to enable the Vertex AI and Duet AI APIs for your project. You can do this by going to the **APIs & Services** dashboard in the console, and clicking on the **Enable APIs and Services** button. Search for **Vertex AI** and **Duet AI**, and enable them one by one.

Step 3: Open Cloud Shell Editor

Time to open the Cloud Shell Editor, a special on line device for converting code and giving instructions inside the cloud. Click, & Activate Cloud Shell; button up in the proper corner of the console. Then, Open Editor; button down within the proper nook of the shell.

Step 4: Create a new Python file

Inside the Cloud Shell Editor, make a sparkling Python report. Click the File.>; menu, then >New File,>; and pick out >Python File.>; Name your report >app. Py>; and keep it in your private home spot.

Step 5: Write the code for the web app

Now, we get to the exciting component: writing code for the internet app. And here’s the cool factor – you could get help from Duet AI. To make it paintings, faucet on the>;Duet AI> icon on the left side of the editor. It opens a chat where you can ask Duet AI questions or ask for code thoughts.

How the HTML code for the web app might look like after using Duet AI:

python

# import Flask

from flask import Flask, render_template

# import requests

import requests

# create Flask app

app = Flask(__name__)

# create route for home page

@app.route(“/”)

def index():

    # get weather data from OpenWeatherMap API using requests library

    api_key = “your_api_key”

    base_url = “http://api.openweathermap.org/data/2.5/weather?”

    cities = [“Sydney”, “New York”, “London”, “Tokyo”]

    weather_data = []

    for city in cities:

        url = base_url + “q=” + city + “&appid=” + api_key

        response = requests.get(url)

        data = response.json()

        weather_data.append(data)

    # render template with weather data

    return render_template(“index.html”, weather_data=weather_data)

# run app

if __name__ == “__main__”:

    app.run(debug=True)

Step 6: Create a new HTML file

Next, you need to create a brand new HTML report for the net app’s front-give up. You can do this by means of clicking on the **File** menu, then **New File**, then **HTML File**. Name your report **index.Html**, and store it in a folder called **templates** in your house directory.

Step 7: Write the HTML code for the web app

You can also use Duet AI to help you write the HTML code for the web app. For example, you can ask Duet AI how to create a table, or how to display the weather data in the table. You can also write comments in your HTML file, and ask Duet AI to generate HTML code based on them. For example, you can write <!– create a header with the title of the web app –>, and ask Duet AI to generate HTML code for that comment.


Conclusion

In this blog publish, we’ve be able to explain how Vertex AI and Duet AI can assist us build and installation cloud applications faster and less complicated. Vertex AI is like one big toolbox that does many things for making computer models. It helps you build them, teach them, make them better, and watch how they’re doing on a big scale. Duet AI is your AI-powered collaborator that provides conversational and code assistance across Google Cloud and your IDE. You can chat with Duet AI in natural language to get answers to cloud questions, guidance on best practices, or code suggestions based on your comments. Duet AI is specially trained on Google Cloud content and supports multiple programming languages.

FAQ

1.What is the difference between Google Duet AI and Vertex AI ?

Duet AI in natural language to get answers to cloud questions, guidance on best practices, or code suggestions based on your comments ‘while, Vertex AI helps you build them, teach them, make them better, and watch how they’re doing on a big scale

2. How Can I Create a new project in Google Cloud Console ?

In the Google Cloud console, go to Menu menu > IAM & Admin > Create a Project. Go to Create a Project

In the Project Name field, enter a descriptive name for your project. Optional

  1. To edit the Project ID, click Edit. The project ID can’t be changed after the project is created, so choose an ID that meets your needs for the lifetime of the project.
  2. In the Location field, click Browse to display potential locations for your project. Then, click Select. Caution: Can’t find your Google Workspace organization?
  3. Click Create. The console navigates to the Dashboard page and your project is created within a few minutes.

3. Is Vertex AI free?

Google Vertex isn’t completely free. Google has some free stuff, like a trial version for certain things in the Google Cloud, but Vertex AI isn’t in that free part. Vertex AI is Google’s cool platform for machine learning.

4. Is Google Duet AI free?

Google Duet AI: New Features for Gmail, Docs and Sheets, at $30 a Month.


AlphaBetah

AlphaBetah

Alphahbetah is a blogger with Openais.help team. She specializes in writing and improving blog articles, and she takes pleasure in crafting content that aids individuals in mastering SEO.

What to read next...

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *