zyshan-ds commited on
Commit
eefbbb4
·
verified ·
1 Parent(s): d1543d3

Modified the description

Browse files
Files changed (1) hide show
  1. app.py +26 -16
app.py CHANGED
@@ -218,22 +218,32 @@ def csv_to_textgrid(file, tier_name="generated_tier"):
218
  return None, f"Error: {str(e)}"
219
 
220
  # ==== Gradio Interface Setup ====
221
- csv_format_instruction = """**Expected CSV format:**
222
- The first row is the header. Each subsequent row should contain:\n
223
- `file_name, xmin, xmax, text, is_unit_start_pred`
224
- Each row represents a word or segment in an audio file.
225
- - `file_name`: Identifier for the audio file (used to group intervals).
226
- - `xmin`: Start time of the segment (in seconds).
227
- - `xmax`: End time of the segment (in seconds).
228
- - `text`: The actual spoken word or phrase.
229
- - `is_unit_start_pred`: Marks the beginning of a new unit (TRUE/FALSE).
230
- **Please enter the tier name according to your preference or as deemed appropriate for the data.**
231
- Example:\n
232
- | file_name | xmin | xmax | text | is_unit_start_pred |
233
- |-----------|--------|--------|-------|---------------------|
234
- | example1 | 20.42 | 20.74 | mhmm | TRUE |
235
- | example1 | 20.74 | 20.81 | hello | TRUE |
236
- | example1 | 20.81 | 20.92 | world | FALSE |
 
 
 
 
 
 
 
 
 
 
237
  """
238
 
239
  iface = gr.Interface(
 
218
  return None, f"Error: {str(e)}"
219
 
220
  # ==== Gradio Interface Setup ====
221
+ csv_format_instruction = """
222
+ **Expected CSV Format:**
223
+
224
+ Please ensure that the CSV file adheres to the following format:\n
225
+
226
+ - The first row must contain headers: `, file_name, xmin, xmax, text, is_unit_start_pred`.
227
+ - Each subsequent row should contain the following columns for every word or segment in the audio file:
228
+ - `file_name`: Identifier for the audio file, used to group intervals.
229
+ - `xmin`: Start time of the segment (in seconds).
230
+ - `xmax`: End time of the segment (in seconds).
231
+ - `text`: The actual spoken word or phrase.
232
+ - `is_unit_start_pred`: Marks the beginning of a new unit (TRUE/FALSE).
233
+
234
+ **Please note: We currently only accept CSVs with an index.**
235
+
236
+ **Tier Name:**
237
+ Please enter the tier name according to your preference or as deemed appropriate for the data.
238
+
239
+ **Example CSV:**
240
+
241
+ | | file_name | xmin | xmax | text | is_unit_start_pred |
242
+ |---|------------|--------|--------|-------|--------------------|
243
+ | 0 | example1 | 20.42 | 20.74 | mhmm | TRUE |
244
+ | 1 | example1 | 20.74 | 20.81 | hello | TRUE |
245
+ | 2 | example1 | 20.81 | 20.92 | world | FALSE |
246
+
247
  """
248
 
249
  iface = gr.Interface(