インターフェースのラベルを日本語に翻訳しました。画像と動画のアップロード、結果表示、説明文を含みます。
Browse files- __pycache__/ben_base.cpython-311.pyc +0 -0
- app.py +9 -9
__pycache__/ben_base.cpython-311.pyc
ADDED
|
Binary file (74.8 kB). View file
|
|
|
app.py
CHANGED
|
@@ -75,8 +75,8 @@ def process_file(f):
|
|
| 75 |
return name_path
|
| 76 |
|
| 77 |
# Interface components
|
| 78 |
-
image = gr.Image(label="
|
| 79 |
-
video = gr.Video(label="
|
| 80 |
|
| 81 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 82 |
image_path = os.path.join(current_dir, "image.jpg")
|
|
@@ -87,8 +87,8 @@ tab1 = gr.Interface(
|
|
| 87 |
fn,
|
| 88 |
inputs=image,
|
| 89 |
outputs=[
|
| 90 |
-
gr.Image(label="
|
| 91 |
-
gr.File(label="
|
| 92 |
],
|
| 93 |
examples=[examples],
|
| 94 |
api_name="image"
|
|
@@ -98,17 +98,17 @@ tab1 = gr.Interface(
|
|
| 98 |
tab2 = gr.Interface(
|
| 99 |
process_video,
|
| 100 |
inputs=video,
|
| 101 |
-
outputs=gr.Video(label="
|
| 102 |
api_name="video",
|
| 103 |
-
title="
|
| 104 |
-
description="
|
| 105 |
)
|
| 106 |
|
| 107 |
# Combined interface
|
| 108 |
demo = gr.TabbedInterface(
|
| 109 |
[tab1, tab2],
|
| 110 |
-
["
|
| 111 |
-
title="BEN2
|
| 112 |
# description="Note: Video processing is limited to the first 100 frames for performance reasons."
|
| 113 |
)
|
| 114 |
|
|
|
|
| 75 |
return name_path
|
| 76 |
|
| 77 |
# Interface components
|
| 78 |
+
image = gr.Image(label="画像をアップロード")
|
| 79 |
+
video = gr.Video(label="動画をアップロード")
|
| 80 |
|
| 81 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 82 |
image_path = os.path.join(current_dir, "image.jpg")
|
|
|
|
| 87 |
fn,
|
| 88 |
inputs=image,
|
| 89 |
outputs=[
|
| 90 |
+
gr.Image(label="結果 前景"),
|
| 91 |
+
gr.File(label="PNGをダウンロード")
|
| 92 |
],
|
| 93 |
examples=[examples],
|
| 94 |
api_name="image"
|
|
|
|
| 98 |
tab2 = gr.Interface(
|
| 99 |
process_video,
|
| 100 |
inputs=video,
|
| 101 |
+
outputs=gr.Video(label="結果動画"),
|
| 102 |
api_name="video",
|
| 103 |
+
title="動画処理(実験的)",
|
| 104 |
+
description="注意: ZeroGPUのタイムアウトのため、動画は最初の100フレームのみ処理されます。"
|
| 105 |
)
|
| 106 |
|
| 107 |
# Combined interface
|
| 108 |
demo = gr.TabbedInterface(
|
| 109 |
[tab1, tab2],
|
| 110 |
+
["画像処理", "動画処理"],
|
| 111 |
+
title="BEN2 背景除去ツール. より高品質な前景画像・動画をダウンロードできます。",
|
| 112 |
# description="Note: Video processing is limited to the first 100 frames for performance reasons."
|
| 113 |
)
|
| 114 |
|