kamillkate commited on
Commit
5cb7c53
·
verified ·
1 Parent(s): f2e7475

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -992,7 +992,7 @@ def create_gradio_interface(model_path: str, default_max_tokens: int = 8192, att
992
  context_info_input = gr.Textbox(
993
  label="Context Information",
994
  placeholder="Enter hotwords, speaker names, topics, or other context to help transcription...\nExample:\nJohn Smith\nMachine Learning\nOpenAI",
995
- value="群益投信\n日日扣\n華夏盛世\n全球優先順位非投資等級債",
996
  lines=4,
997
  max_lines=8,
998
  interactive=True,
@@ -1099,23 +1099,23 @@ def create_gradio_interface(model_path: str, default_max_tokens: int = 8192, att
1099
  )
1100
 
1101
  # # Add examples
1102
- # gr.Markdown("## 📋 Instructions")
1103
- # gr.Markdown(f"""
1104
- # 1. **Upload Audio**: Use the audio component to upload a file or record from microphone
1105
- # - **Supported formats**: {', '.join(sorted(set([ext.lower() for ext in COMMON_AUDIO_EXTS])))}
1106
- # - Optionally set **Start/End time** (seconds or hh:mm:ss) to clip before transcription
1107
- # 2. **Context Info (Optional)**: Provide context to improve transcription accuracy
1108
- # - Add hotwords, proper nouns, speaker names, or technical terms
1109
- # - One item per line or comma-separated
1110
- # - Examples: "John Smith", "OpenAI", "machine learning"
1111
- # 3. **Adjust Parameters**: Configure generation parameters as needed
1112
- # 4. **Transcribe**: Click "Transcribe" to get results
1113
- # 5. **Review Results**:
1114
- # - **Raw Output**: View the model's original output
1115
- # - **Audio Segments**: Play individual segments directly to verify accuracy
1116
-
1117
- # **Audio Segments**: Each segment shows the time range, speaker ID, transcribed content, and an embedded audio player for immediate verification.
1118
- # """)
1119
 
1120
  return demo, custom_css
1121
 
 
992
  context_info_input = gr.Textbox(
993
  label="Context Information",
994
  placeholder="Enter hotwords, speaker names, topics, or other context to help transcription...\nExample:\nJohn Smith\nMachine Learning\nOpenAI",
995
+ value="",
996
  lines=4,
997
  max_lines=8,
998
  interactive=True,
 
1099
  )
1100
 
1101
  # # Add examples
1102
+ gr.Markdown("## 📋 Instructions")
1103
+ gr.Markdown(f"""
1104
+ 1. **Upload Audio**: Use the audio component to upload a file or record from microphone
1105
+ - **Supported formats**: {', '.join(sorted(set([ext.lower() for ext in COMMON_AUDIO_EXTS])))}
1106
+ - Optionally set **Start/End time** (seconds or hh:mm:ss) to clip before transcription
1107
+ 2. **Context Info (Optional)**: Provide context to improve transcription accuracy
1108
+ - Add hotwords, proper nouns, speaker names, or technical terms
1109
+ - One item per line or comma-separated
1110
+ - Examples: "John Smith", "OpenAI", "machine learning"
1111
+ 3. **Adjust Parameters**: Configure generation parameters as needed
1112
+ 4. **Transcribe**: Click "Transcribe" to get results
1113
+ 5. **Review Results**:
1114
+ - **Raw Output**: View the model's original output
1115
+ - **Audio Segments**: Play individual segments directly to verify accuracy
1116
+
1117
+ **Audio Segments**: Each segment shows the time range, speaker ID, transcribed content, and an embedded audio player for immediate verification.
1118
+ """)
1119
 
1120
  return demo, custom_css
1121