Download app.py from yosuke-i/test_2: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/spaces/yosuke-i/test_2/resolve/main/app.py
- Command line
-
hf download hf://spaces/yosuke-i/test_2/app.py
-
curl -L -o app.py https://huggingface.co/spaces/yosuke-i/test_2/resolve/main/app.py
585 Bytes
| import gradio as gr | |
| # テキストを逆さにする関数 | |
| def reverse_text(text): | |
| return text[::-1] | |
| # Gradioインターフェイスを作成 | |
| interface = gr.Interface( | |
| fn=reverse_text, # 使用する関数 | |
| inputs="text", # 入力のタイプ | |
| outputs="text", # 出力のタイプ | |
| title="テキストリバーサー", # インターフェイスのタイトル | |
| description="テキストを逆さにするツール" # インターフェイスの説明 | |
| ) | |
| # インターフェイスを実行 | |
| interface.launch() | |