BHW commited on
Commit
2b461ea
·
verified ·
1 Parent(s): 81fa27b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,6 +6,7 @@ import hashlib
6
 
7
 
8
  MAX_LENGTH = 1.5 # in seconds
 
9
 
10
  # Initialize a list to store file paths
11
  uploaded_files = []
@@ -19,7 +20,7 @@ help_en = f"""
19
  """
20
  help_zh_tw = f"""
21
  ### 使用流程:
22
- 1. **選擇標記**: 從下拉選單中選擇一個標記,或選擇“自定義”以輸入自己的標記。
23
  2. **輸入用戶名稱**: 輸入您的用戶名稱,用於生成錄音唯一ID。
24
  3. **錄製音頻**: 點擊“錄製音頻”按鈕開始錄音。每次錄音的最長時間為{MAX_LENGTH}秒。
25
  4. **提交錄音**: 錄製完成後,點擊“提交”按鈕保存錄音。
@@ -73,7 +74,7 @@ def save_audio(audio, dropdown_label, custom_label, speaker_name):
73
  # Interface design using gr.Blocks
74
  def create_interface():
75
  with gr.Blocks() as demo:
76
- labels = ["Label1", "Label2", "Label3", "Custom"] # Add a "Custom" option for custom label
77
  label_dropdown = gr.Dropdown(choices=labels, label="Select Label")
78
  custom_label = gr.Textbox(label="Enter Custom Label", visible=False) # Initially hidden
79
 
 
6
 
7
 
8
  MAX_LENGTH = 1.5 # in seconds
9
+ LABLES = ["Hi! Gemtek!", "Hi! Genix!", "Custom"]
10
 
11
  # Initialize a list to store file paths
12
  uploaded_files = []
 
20
  """
21
  help_zh_tw = f"""
22
  ### 使用流程:
23
+ 1. **選擇標記**: 從下拉選單中選擇一個標記,或選擇“Custom”以輸入自己的標記。
24
  2. **輸入用戶名稱**: 輸入您的用戶名稱,用於生成錄音唯一ID。
25
  3. **錄製音頻**: 點擊“錄製音頻”按鈕開始錄音。每次錄音的最長時間為{MAX_LENGTH}秒。
26
  4. **提交錄音**: 錄製完成後,點擊“提交”按鈕保存錄音。
 
74
  # Interface design using gr.Blocks
75
  def create_interface():
76
  with gr.Blocks() as demo:
77
+ labels = LABELS # Add a "Custom" option for custom label
78
  label_dropdown = gr.Dropdown(choices=labels, label="Select Label")
79
  custom_label = gr.Textbox(label="Enter Custom Label", visible=False) # Initially hidden
80