Spaces:
Sleeping
Sleeping
Modified the description
Browse files
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 = """
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
-
|
| 227 |
-
-
|
| 228 |
-
- `
|
| 229 |
-
- `
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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(
|