RepositoryC#CNChina
feiyun0112

feiyun0112/Gradio.Net

⭐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. Gradio for .NET – 基于 Gradio 的 .NET 移植,Gradio 是一个开源 Python 包,允许你为机器学习模型、API 或任何任意 Python 函数快速构建演示或 Web 应用程序。

339stars
46forks
0issues
1views

⚡ Gradio for .NET — turn any C# method into a web app

Same frontend, same protocol, same config as Python Gradio — but the handler is C#.

Gradio.Net is a .NET port of Gradio 6.30.0, the Python package that turns a function into a web demo. It lets you build a UI for a model, an API or any C# method in a few lines: users drag in images, paste text, record voice, and talk to your code through the browser. No JavaScript, no CSS.

✨ Highlights

  • Drop-in port: page rendered by the Python version's own compiled frontend, unchanged; same protocol and config.
  • gr.Interface: wraps any C# method into a page, built from the handler's signature, no layout code.
  • gr.Blocks: full layout control — Row, Column, Tabs/Tab, events like button.Click(fn, inputs, outputs).
  • ASP.NET Core native: AddGradio() plus UseGradio(page) serves routes, assets and queue inside your host.
  • One API, two spellings: gr factories match Python names and defaults; underneath sit ordinary typed components you can hold, pass or subclass.
  • Streaming support: generator handlers yield pieces that replace the output live, with Progress moving the bar.
  • Chat and forms: gr.ChatInterface streams answers from an endpoint; forms submit many fields at once and link fields via gr.Update.

💡 Why it matters

For .NET teams this removes the usual tax of shipping a model demo: no Python sidecar, no hand-written frontend. A ported Python file differs by three edits only — = becomes :, with becomes using, a decorator becomes a call — and GrPortingTests checks that parity.

It fits model demos, API playgrounds and internal tools where the logic already lives in C#. The README ships runnable demos (Quickstart, Blocks, Chat, Streaming, Form) to copy from.


#Gradio #DotNet #MachineLearning #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
gradio-app/gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!

44.1k
Nov 22, 2026
RepositoryPython
streamlit/streamlit

Streamlit — The agent-native framework for data apps and dashboards.

46.5k
Nov 22, 2026
RepositoryPython
scikit-learn/scikit-learn

scikit-learn: machine learning in Python

68.3k
Nov 23, 2026
RepositoryPython
keras-team/keras

Deep Learning for humans

64.4k
Nov 18, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.8k
Nov 23, 2026
RepositoryJupyter Notebook
GokuMohandas/Made-With-ML

Learn how to develop, deploy and iterate on production-grade ML applications.

50.1k
Mar 4, 2026
RepositoryJupyter Notebook
microsoft/Data-Science-For-Beginners

10 Weeks, 20 Lessons, Data Science for All!

38.1k
Oct 21, 2026
RepositoryJavaScript
AMAI-GmbH/AI-Expert-Roadmap

Roadmap to becoming an Artificial Intelligence Expert in 2022

31.4k
Sep 12, 2025
RepositoryPython
reflex-dev/reflex

🕸️ Web apps in pure Python 🐍

29.0k
Nov 20, 2026