Spaces:
Runtime error
Runtime error
Commit
·
5ff5aa7
1
Parent(s):
7ccf883
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def sample_df():
|
|
61 |
full_text = full_text.translate(str.maketrans('', '', string.punctuation))
|
62 |
sents = ['\n'.join(wrap(re.sub(r'###audio###\d###', '', s.text), width=70) )for s in nlp(full_text).sents]
|
63 |
sents.append('No audio description')
|
64 |
-
return audio_path, audio_url
|
65 |
|
66 |
def audio_demo(cap, audio, annotator, audio_url):
|
67 |
annotator = annotator if annotator else str(uuid.uuid4())
|
@@ -71,7 +71,7 @@ def audio_demo(cap, audio, annotator, audio_url):
|
|
71 |
worksheet.update([df.columns.values.tolist()] + df.values.tolist())
|
72 |
return 'success!'
|
73 |
|
74 |
-
audio_path, audio_url = sample_df()
|
75 |
|
76 |
iface = gr.Interface(
|
77 |
audio_demo,
|
|
|
61 |
full_text = full_text.translate(str.maketrans('', '', string.punctuation))
|
62 |
sents = ['\n'.join(wrap(re.sub(r'###audio###\d###', '', s.text), width=70) )for s in nlp(full_text).sents]
|
63 |
sents.append('No audio description')
|
64 |
+
return audio_path, audio_url, sents
|
65 |
|
66 |
def audio_demo(cap, audio, annotator, audio_url):
|
67 |
annotator = annotator if annotator else str(uuid.uuid4())
|
|
|
71 |
worksheet.update([df.columns.values.tolist()] + df.values.tolist())
|
72 |
return 'success!'
|
73 |
|
74 |
+
audio_path, audio_url, sents = sample_df()
|
75 |
|
76 |
iface = gr.Interface(
|
77 |
audio_demo,
|