Skip to main content

Getting started with AI development in .NET

Getting started in the world of AI development can be a challenge. Every day new libraries, models and possibilities appear. So what is your first step and where can I find good examples on how to tackle different problems?

This is where Microsoft wants to help through the AI Dev Gallery. The AI Dev Gallery is an open-source app designed to help Windows developers integrate AI capabilities within their own apps and projects.

The app contains the following:

  • Over 25 interactive samples powered by local AI models
  • Easily explore, download, and run models from Hugging Face and GitHub
  • The ability to view the C# source code and simply export a standalone Visual Studio project for each sample

You can download the AI Dev Gallery directly or through the Windows App Store:

A walkthrough

Let me walk you through some of the features in the AI Dev Gallery application.

  • After opening the app you arrive on the Home page where you have a carrousel of different use cases:

 

  • When you click on a specific example, I can first select and download a model from Hugging Face:

 

  • After agreeing with the Terms and Conditions for the selected model, the download starts:

 

  • Once the download is completed, we can continue by selecting the downloaded model and clicking on Run sample:

 

  • We now see the sample in action:
  • By clicking on the Code button, we can see the exact code used to create this example:

  • We can use this example as a starting point for our own solution by clicking on the Export button. We are asked to either use the central model cache or create a copy of the model in our project directory:

 

That is a good start. Let’s now discover some of the other features of this app.

The samples

The home page only shows a limited set of samples. If you want to explore the full set of available applications, you need to go to the Samples page. This page gives you an overview of all samples split out in multiple categories.

If you click on a specific example, you go through the same steps as I showed you in the walkthrough above.

The models

Next we have the models page. On this page you find a list of models that can be run locally split out in different categories. For every model you get some instructions on how to run it, a button to download the model and a list of samples where this model can be used:

The APIs

The last page is the Windows AI APIs page. Here you can learn and explore all the Windows APIs that are available for different use cases.

When you click on a specific use case, you get example code to explore the API in more detail:

 

Remark: For most of these APIs a Windows AI Copilot+ PC is required.

More information

Introducing the AI Dev Gallery: Your Gateway to Local AI Development with .NET - .NET Blog

Overview for AI Dev Gallery app | Microsoft Learn

AI Dev Gallery (Preview) - Free download and install on Windows | Microsoft Store

Popular posts from this blog

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Col...