oKen38461 commited on
Commit
e2ffc2b
·
1 Parent(s): 00635ce

インターフェースのラベルを日本語に翻訳しました。画像と動画のアップロード、結果表示、説明文を含みます。

Browse files
Files changed (2) hide show
  1. __pycache__/ben_base.cpython-311.pyc +0 -0
  2. 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="Upload an image")
79
- video = gr.Video(label="Upload a video")
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="Result Foreground"),
91
- gr.File(label="Download PNG")
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="Result Video"),
102
  api_name="video",
103
- title="Video Processing (experimental)",
104
- description="Note: For ZeroGPU timeout, videos are limited to processing the first 100 frames only."
105
  )
106
 
107
  # Combined interface
108
  demo = gr.TabbedInterface(
109
  [tab1, tab2],
110
- ["Image Processing", "Video Processing"],
111
- title="BEN2 for background removal. Download the image/video for higher quality foreground.",
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