soiz1 commited on
Commit
dfb4678
·
verified ·
1 Parent(s): 7ba75ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -3
app.py CHANGED
@@ -1,5 +1,4 @@
1
- #!pip install gradio pydub
2
- #!apt install ffmpeg
3
  import gradio as gr
4
  from pydub import AudioSegment
5
  import tempfile
@@ -36,6 +35,33 @@ def process_audio(file,
36
  # UIの設定
37
  options = ["left", "right", "mute"]
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  demo = gr.Interface(
40
  fn=process_audio,
41
  inputs=[
@@ -45,7 +71,8 @@ demo = gr.Interface(
45
  ],
46
  outputs=gr.Audio(label="出力音声(設定済みステレオ)"),
47
  title="ステレオチャンネル編集ツール",
48
- description="左・右チャンネルの音声ソースを個別に設定して、新しいステレオ音声を出力します。"
 
49
  )
50
 
51
  if __name__ == "__main__":
 
1
+
 
2
  import gradio as gr
3
  from pydub import AudioSegment
4
  import tempfile
 
35
  # UIの設定
36
  options = ["left", "right", "mute"]
37
 
38
+ theme = gr.themes.Base(
39
+ primary_hue="sky",
40
+ neutral_hue="slate",
41
+ text_size="lg",
42
+ radius_size="sm",
43
+ font=[gr.themes.GoogleFont('Zen Maru Gothic'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
44
+ font_mono=[gr.themes.GoogleFont('Kosugi Maru'), 'ui-monospace', 'Consolas', 'monospace'],
45
+ ).set(
46
+ body_text_weight='500',
47
+ embed_radius='*radius_xxs',
48
+ border_color_primary='*neutral_400',
49
+ border_color_primary_dark='*neutral_400',
50
+ shadow_drop='*block_shadow',
51
+ shadow_drop_lg='*shadow_drop',
52
+ button_border_width='*block_border_width',
53
+ button_border_width_dark='*block_border_width',
54
+ button_shadow='*shadow_drop',
55
+ button_shadow_active='*shadow_drop',
56
+ button_shadow_hover='*shadow_inset',
57
+ button_large_padding='*spacing_md',
58
+ button_large_radius='*radius_sm',
59
+ button_small_radius='*radius_xxl',
60
+ button_primary_background_fill='*primary_100',
61
+ button_primary_background_fill_dark='*primary_500',
62
+ button_primary_background_fill_hover_dark='*button_secondary_background_fill_hover'
63
+ )
64
+
65
  demo = gr.Interface(
66
  fn=process_audio,
67
  inputs=[
 
71
  ],
72
  outputs=gr.Audio(label="出力音声(設定済みステレオ)"),
73
  title="ステレオチャンネル編集ツール",
74
+ description="左・右チャンネルの音声ソースを個別に設定して、新しいステレオ音声を出力します。",
75
+ theme=theme
76
  )
77
 
78
  if __name__ == "__main__":