Skip to content

Commit

Permalink
Merge pull request #13 from eltociear/add-japanese-readme
Browse files Browse the repository at this point in the history
docs: add Japanese README
  • Loading branch information
sdcb authored Aug 21, 2024
2 parents 4bb04bc + 43c5e45 commit 1cb0e03
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gradio.NET: Build Machine Learning Web Apps — in .NET [![main](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml/badge.svg)](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml) [![NuGet](https://img.shields.io/nuget/v/Gradio.Net.svg)](https://nuget.org/packages/Gradio.Net)

**English** | **[简体中文](readme_files/README_zh-cn.md)**
**English** | **[简体中文](readme_files/README_zh-cn.md)** | **[日本語](readme_files/README_ja.md)**

Gradio for .NET – a port of [Gradio](https://github.com/gradio-app/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!*

Expand Down
67 changes: 67 additions & 0 deletions readme_files/README_ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Gradio.NET: .NETで機械学習Webアプリを構築 [![main](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml/badge.svg)](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml) [![NuGet](https://img.shields.io/nuget/v/Gradio.Net.svg)](https://nuget.org/packages/Gradio.Net)

**[English](../README.md)** | **[简体中文](readme_files/README_zh-cn.md)** | **日本語**

Gradio for .NET – [Gradio](https://github.com/gradio-app/gradio) の .NET 移植版で、機械学習モデル、API、または任意のPython関数のデモやWebアプリケーションを迅速に**構築**するためのオープンソースのPythonパッケージです。*JavaScript、CSS、またはWebホスティングの経験は不要です!*

![demo](./demo.gif)

上記のような美しいデモを作成するには、ほんの数行の .NET コードが必要です。それでは始めましょう 💫

### 最初のデモを構築する

- 1. ASP.NET Core Web API プロジェクトを作成します。

- 2. NuGet パッケージ **Gradio.Net.AspNetCore** をインストールします。

- 3. Program.cs にサンプルコードを入力します:


```C#
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;
}
}
```

これで完了です🎉🎉🎉

**既存のプロジェクトで **Gradio.Net.AspNetCore** を使用したい場合**

`AddGradio``UseGradio` 拡張メソッドを使用できます:

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

var app = builder.Build();

app.UseGradio(await CreateBlocks());

app.Run();
```

### デモ

| Source Code | Demo Image |
| ----------- | ---------- |
| [Layout](./layout_demo.md) | ![image](./layout_demo.gif) |
| [Form](./form_demo.md) | ![image](./form_demo.gif) |
| [Media](./media_demo.md) | ![image](./media_demo.gif) |
| [Chatbot](./chatbot_demo.md) | ![image](./chatbot_demo.gif) |
| [Progress](./progress_demo.md) | ![image](./progress_demo.gif) |
2 changes: 1 addition & 1 deletion readme_files/README_zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gradio.NET: 使用 .NET 生成机器学习 Web 应用 [![main](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml/badge.svg)](https://github.com/feiyun0112/Gradio.Net/actions/workflows/main.yml) [![NuGet](https://img.shields.io/nuget/v/Gradio.Net.svg)](https://nuget.org/packages/Gradio.Net)

**[English](../README.md)** | 简体中文
**[English](../README.md)** | **[简体中文](readme_files/README_zh-cn.md)** | **[日本語](readme_files/README_ja.md)**

Gradio for .NET – [Gradio](https://github.com/gradio-app/gradio) 的 .NET 移植,Gradio是一个开源 Python 包,允许您为机器学习模型、API 或任何任意 Python 函数快速构建演示或 Web 应用程序。*无需任何 JavaScript、CSS 经验!*

Expand Down

0 comments on commit 1cb0e03

Please sign in to comment.