Spaces:
Running
on
Zero
Running
on
Zero
clement-pages
commited on
Commit
·
3d27f20
1
Parent(s):
03a5c9f
Moove poster to a specific tab
Browse files
app.py
CHANGED
|
@@ -17,60 +17,43 @@ def update_annotations(data):
|
|
| 17 |
|
| 18 |
|
| 19 |
with gr.Blocks() as demo:
|
| 20 |
-
with gr.Row(
|
| 21 |
-
with gr.
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
gr.Markdown(
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
)
|
| 26 |
-
with gr.Column(scale=6):
|
| 27 |
-
gr.Markdown('<h1 style="font-size: 3em;">gryannote</h1>')
|
| 28 |
-
gr.Markdown("<h2>Make the audio labeling process easier and faster! </h2>")
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
)
|
| 38 |
-
|
| 39 |
-
gr.Markdown()
|
| 40 |
-
gr.Markdown('<img src="https://github.com/clement-pages/gryannote/blob/main/docs/assets/poster-interspeech.jpg?raw=true" alt="gryannote poster"/>')
|
| 41 |
-
with gr.Column():
|
| 42 |
-
audio_labeling = AudioLabeling(
|
| 43 |
-
type="filepath",
|
| 44 |
-
interactive=True,
|
| 45 |
-
)
|
| 46 |
-
|
| 47 |
-
gr.Markdown()
|
| 48 |
-
gr.Markdown()
|
| 49 |
-
|
| 50 |
-
run_btn = gr.Button("Run pipeline")
|
| 51 |
-
|
| 52 |
-
rttm = RTTM()
|
| 53 |
-
|
| 54 |
-
gr.Markdown(
|
| 55 |
-
"""| Shortcut | Action |
|
| 56 |
-
| --------------------------------------------- | --------------------------------------------------------------------- |
|
| 57 |
-
| `SPACE` | Toggle play / pause |
|
| 58 |
-
| `ENTER` | Create annotation at current time |
|
| 59 |
-
| `SHIFT + ENTER` | Split annotation at current time |
|
| 60 |
-
| `A`, `B`, `C`, ..., `Z` | Set active label. If there is a selected annotation, update its label |
|
| 61 |
-
| `LEFT` or `RIGHT` | Edit start time of selected annotation (if any) or move time cursor |
|
| 62 |
-
| `SHIFT + LEFT` or `SHIFT + RIGHT` | Same, but faster |
|
| 63 |
-
|`ALT + LEFT` or `ALT + RIGHT` | Edit end time of selected annotation |
|
| 64 |
-
| `SHIFT + ALT + LEFT` or `SHIFT + ALT + RIGHT` | Same, but faster |
|
| 65 |
-
| `TAB` | Select next annotation |
|
| 66 |
-
| `SHIFT + TAB` | Select previous annotation |
|
| 67 |
-
|`BACKSPACE` | Delete selected annotation and select the previous one |
|
| 68 |
-
|`DELETE` or `SHIFT + BACKSPACE` | Delete selected region and select the next one |
|
| 69 |
-
|`ESC` | Unselect selected annotation and / or label |
|
| 70 |
-
| `UP` or `DOWN` | Zoom in/out |
|
| 71 |
-
| `F2` | Open settings for the active label |
|
| 72 |
-
"""
|
| 73 |
-
)
|
| 74 |
|
| 75 |
run_btn.click(
|
| 76 |
fn=apply_pipeline,
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
with gr.Blocks() as demo:
|
| 20 |
+
with gr.Row():
|
| 21 |
+
with gr.Column():
|
| 22 |
+
|
| 23 |
+
with gr.Row():
|
| 24 |
+
with gr.Column(scale=1):
|
| 25 |
+
gr.Markdown(
|
| 26 |
+
'<a href="https://github.com/clement-pages/gryannote"><img src="https://github.com/clement-pages/gryannote/blob/main/docs/assets/logo-gryannote.png?raw=true" alt="gryannote logo" width="140"/></a>',
|
| 27 |
+
)
|
| 28 |
+
with gr.Column(scale=10):
|
| 29 |
+
gr.Markdown('<h1 style="font-size: 4em;">gryannote</h1>')
|
| 30 |
+
gr.Markdown()
|
| 31 |
+
gr.Markdown('<h2 style="font-size: 2em;">Make the audio labeling process easier and faster! </h2>')
|
| 32 |
+
|
| 33 |
+
with gr.Tab("application"):
|
| 34 |
gr.Markdown(
|
| 35 |
+
"To use the component, start by loading or recording audio."
|
| 36 |
+
"Then apply the diarization pipeline (here [pyannote/speaker-diarization-3.1](https://huggingface.co/pyannote/speaker-diarization-3.1))"
|
| 37 |
+
"or double-click directly on the waveform to add an annotations. The annotations produced can be edited."
|
| 38 |
+
" You can also use keyboard shortcuts to speed things up! Click on the help button to see all the available shortcuts."
|
| 39 |
+
" Finally, annotations can be saved by cliking on the downloading button in the RTTM component."
|
| 40 |
+
)
|
| 41 |
+
gr.Markdown()
|
| 42 |
+
gr.Markdown()
|
| 43 |
+
audio_labeling = AudioLabeling(
|
| 44 |
+
type="filepath",
|
| 45 |
+
interactive=True,
|
| 46 |
)
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
gr.Markdown()
|
| 49 |
+
gr.Markdown()
|
| 50 |
+
|
| 51 |
+
run_btn = gr.Button("Run pipeline")
|
| 52 |
+
|
| 53 |
+
rttm = RTTM()
|
| 54 |
+
|
| 55 |
+
with gr.Tab("poster"):
|
| 56 |
+
gr.Markdown('<img src="https://github.com/clement-pages/gryannote/blob/main/docs/assets/poster-interspeech.jpg?raw=true" alt="gryannote poster"/>')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
run_btn.click(
|
| 59 |
fn=apply_pipeline,
|