Spaces:
Runtime error
Runtime error
Commit
·
c9afd8b
1
Parent(s):
e0eb985
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def get_transcript_sentiment(url):
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
gr.Markdown(
|
| 43 |
"""
|
| 44 |
-
# MP3 -> Whisper generates captions -> Hugging Face generates sentiment
|
| 45 |
Paste the URL of an audio file (mp3) into the box and get the sentiment.
|
| 46 |
"""
|
| 47 |
)
|
|
@@ -51,11 +51,13 @@ with gr.Blocks() as demo:
|
|
| 51 |
run_btn = gr.Button('Submit')
|
| 52 |
run_btn.click(fn=get_transcript_sentiment, inputs=text_input, outputs=df_output)
|
| 53 |
|
|
|
|
|
|
|
| 54 |
gr.Examples(
|
| 55 |
[['https://archive-media2.granicus.com/OnDemand/sanfrancisco/sanfrancisco_33cae840-42ed-458b-8eaf-bd4760747ab0.mp3'], ['https://archive-media2.granicus.com/OnDemand/sanfrancisco/sanfrancisco_8c0f76b6-527a-4702-b117-ed40c1eb26fd.mp3']],
|
| 56 |
-
# ['San Francisco Mission Cultural Center', 'San Francisco Public Defender Statements'],
|
| 57 |
[text_input],
|
| 58 |
fn=get_transcript_sentiment,
|
|
|
|
| 59 |
)
|
| 60 |
|
| 61 |
|
|
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
gr.Markdown(
|
| 43 |
"""
|
| 44 |
+
# Provide MP3 -> Whisper generates captions -> Hugging Face generates sentiment
|
| 45 |
Paste the URL of an audio file (mp3) into the box and get the sentiment.
|
| 46 |
"""
|
| 47 |
)
|
|
|
|
| 51 |
run_btn = gr.Button('Submit')
|
| 52 |
run_btn.click(fn=get_transcript_sentiment, inputs=text_input, outputs=df_output)
|
| 53 |
|
| 54 |
+
gr.Markdown('### Example 1: [San Francisco Government Public Defender Candidate Statements](https://sanfrancisco.granicus.com/player/clip/42153?view_id=74&redirect=true&h=31a924a5a2f50ac4f57f07b44f58331c)')
|
| 55 |
+
|
| 56 |
gr.Examples(
|
| 57 |
[['https://archive-media2.granicus.com/OnDemand/sanfrancisco/sanfrancisco_33cae840-42ed-458b-8eaf-bd4760747ab0.mp3'], ['https://archive-media2.granicus.com/OnDemand/sanfrancisco/sanfrancisco_8c0f76b6-527a-4702-b117-ed40c1eb26fd.mp3']],
|
|
|
|
| 58 |
[text_input],
|
| 59 |
fn=get_transcript_sentiment,
|
| 60 |
+
label='Example 1'
|
| 61 |
)
|
| 62 |
|
| 63 |
|