I work as senior dotnet web application and .net core web application using asp.net csharp
recently
I learn python and make applications on machine learning and AI
i need real sample or ideas how to use machine learning and AI on dot net application
so my question how to use machine learning and AI on dot net web application
can you give me real example or idea how to do that and if there are sample code will be better
as example i will use python machine learning and ai to calculate ??? on dotnet web application
or get different between ??? and ??? or any sample using please
i need sample for using python machine learing and ai if direct or not direct on web aplication .net
Rijwan AnsariPosted Jan 2, 2024, 11:39 AM
Generally, you can use AI services in .NET like Azure cognitive services. It is just to use AI APIs. We need to identify use cases like Text recognizer, speech, search, OCR, vision, language etc.
If you want to build your own AI models then you can ML.NET or ML designer to do predictions, classifications, regressions and so on.
Regards
Rijwan
SravyaPosted Jan 2, 2024, 11:14 AM
PyTorch.NET library can be used for this purpose.
You can install Pytorch.NET library from Visual studio Nuget package manager in your .NET Project.
dotnet add package PyTorch.NET
Once it is installed and added to your project you can import the package in your source code using :
using Torch;
using TorchSharp;
This will allow you to use PyTorch classes and methods in your .NET applciations.
Keep checking PyTorch documentation for any new classes, features updates that can be imported in your .NET application.
https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html
Aradhana TripathiPosted Dec 29, 2023, 3:04 PM
You can refer below ML.NET Tutorial, this may help you and also can find below sample code.
https://dotnet.microsoft.com/en-us/learn/ml-dotnet/get-started-tutorial/create
Jayraj ChhayaPosted Dec 29, 2023, 11:29 AM
Integrating machine learning and AI into .NET web applications can bring powerful capabilities and enhance user experiences. While Python is a popular language for machine learning and AI, it is possible to leverage its capabilities within a .NET environment. Here are a few approaches you can consider:
Using Python with .NET: You can use Python libraries for machine learning and AI within your .NET web application by leveraging the Python.NET library. This library allows you to call Python code from your .NET application and exchange data seamlessly. You can install the Python.NET package using pip and then use it to import and execute Python code within your .NET application.
Using ML.NET: ML.NET is a cross-platform, open-source machine learning framework developed by Microsoft. It allows you to build custom machine learning models using C# or F# without requiring extensive knowledge of Python. ML.NET provides a wide range of pre-built machine learning algorithms and supports tasks such as classification, regression, clustering, and recommendation systems.
Using TensorFlow.NET: TensorFlow is a popular machine learning framework developed by Google. TensorFlow.NET is a .NET binding for TensorFlow that allows you to use TensorFlow models within your .NET web application. You can train your models in Python using TensorFlow and then load and use them in your .NET application using TensorFlow.NET.
Here's a simple example of using ML.NET to classify text sentiment in a .NET web application:
In this example, we use ML.NET to train a sentiment analysis model on a dataset stored in a CSV file. The
AnalyzeSentimentmethod takes a text input and predicts its sentiment using the trained model.Remember to install the necessary NuGet packages for ML.NET and TensorFlow.NET to use these examples.