Gradio.Net.AspNetCore 0.1.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Gradio.Net.AspNetCore --version 0.1.3                
NuGet\Install-Package Gradio.Net.AspNetCore -Version 0.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gradio.Net.AspNetCore" Version="0.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Gradio.Net.AspNetCore --version 0.1.3                
#r "nuget: Gradio.Net.AspNetCore, 0.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Gradio.Net.AspNetCore as a Cake Addin
#addin nuget:?package=Gradio.Net.AspNetCore&version=0.1.3

// Install Gradio.Net.AspNetCore as a Cake Tool
#tool nuget:?package=Gradio.Net.AspNetCore&version=0.1.3                

Gradio.NET: Build Machine Learning Web Apps — in .NET main NuGet

English | 简体中文

Gradio for .NET – a port of Gradio, an open-source Python package that allows you to quickly build a demo or web application for your machine learning model, API, or any arbitrary Python function. No JavaScript, CSS, or web hosting experience needed!

demo

It just takes a few lines of .NET code to create a beautiful demo like the one above, so let's get started 💫

Building Your First Demo

    1. Create a ASP.NET Core Web API project.
    1. Install NuGet package Gradio.Net.AspNetCore.
    1. Enter the sample code in Program.cs:
App.Launch(await CreateBlocks());

async Task<Blocks> CreateBlocks()
{
    using (var blocks = gr.Blocks())
    {
        gr.Markdown("Start typing below and then click **Run** to see the output.");
        Textbox input, output;
        using (gr.Row())
        {
            input = gr.Textbox(placeholder: "What is your name?");
            output = gr.Textbox();
        }
        var btn = gr.Button("Run");
        await btn.Click(fn: async (input) => gr.Output($"Welcome to Gradio.Net, {Textbox.Payload(input.Data[0])}!"), inputs: new[] { input }, outputs: new[] { output });

        return blocks;
    }
}

That's All🎉🎉🎉

If you wan to use Gradio.Net.AspNetCore in exists project

You can use AddGradio and UseGradio extension methods:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGradio();

var app = builder.Build();

app.UseGradio(await CreateBlocks());

app.Run();

Demos

Source Code Demo Image
Layout image
Form image
Media image
Chatbot image
Progress image
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.0 80 11/9/2024
0.1.6 435 6/26/2024
0.1.5 231 6/25/2024
0.1.3 171 6/21/2024
0.1.0 146 6/6/2024