Spaces:
Runtime error
Runtime error
Commit
·
3a97bdf
1
Parent(s):
d11cee1
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,26 +77,26 @@ def audio_demo(siblings, page_title, audio_meta, audio, annotator, audio_url):
|
|
| 77 |
df['caption'].loc[df['audio_url'] == audio_url] = cap
|
| 78 |
df['annotator'].loc[df['audio_url'] == audio_url] = annotator
|
| 79 |
worksheet.update([df.columns.values.tolist()] + df.values.tolist())
|
| 80 |
-
audio_path, audio_url, sibling_elems, audio_meta, page_title, df, worksheet = sample_df()
|
| 81 |
return 'success!'
|
| 82 |
|
| 83 |
-
audio_path, audio_url, sibling_elems, audio_meta, page_title, df, worksheet = sample_df()
|
| 84 |
-
|
| 85 |
-
iface = gr.Interface(
|
| 86 |
-
audio_demo,
|
| 87 |
-
inputs=[
|
| 88 |
-
gr.CheckboxGroup(sibling_elems, label='sibling elements text'),
|
| 89 |
-
gr.CheckboxGroup(label='page title', choices=[page_title]),
|
| 90 |
-
gr.CheckboxGroup([audio_meta], label='audio metadata'),
|
| 91 |
-
gr.Audio(audio_path, type="filepath", interactive=False),
|
| 92 |
-
gr.Textbox(label='please enter your name'),
|
| 93 |
-
gr.Textbox(value=audio_url, visible=False)
|
| 94 |
-
],
|
| 95 |
-
outputs=[gr.Textbox(label="output")],
|
| 96 |
-
allow_flagging="never",
|
| 97 |
-
title=title,
|
| 98 |
-
description=description,
|
| 99 |
-
)
|
| 100 |
|
| 101 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
iface.launch(show_error=True, debug=True)
|
|
|
|
| 77 |
df['caption'].loc[df['audio_url'] == audio_url] = cap
|
| 78 |
df['annotator'].loc[df['audio_url'] == audio_url] = annotator
|
| 79 |
worksheet.update([df.columns.values.tolist()] + df.values.tolist())
|
|
|
|
| 80 |
return 'success!'
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
if __name__ == "__main__":
|
| 84 |
+
audio_path, audio_url, sibling_elems, audio_meta, page_title, df, worksheet = sample_df()
|
| 85 |
+
|
| 86 |
+
iface = gr.Interface(
|
| 87 |
+
audio_demo,
|
| 88 |
+
inputs=[
|
| 89 |
+
gr.CheckboxGroup(sibling_elems, label='sibling elements text'),
|
| 90 |
+
gr.CheckboxGroup(label='page title', choices=[page_title]),
|
| 91 |
+
gr.CheckboxGroup([audio_meta], label='audio metadata'),
|
| 92 |
+
gr.Audio(audio_path, type="filepath", interactive=False),
|
| 93 |
+
gr.Textbox(label='please enter your name'),
|
| 94 |
+
gr.Textbox(value=audio_url, visible=False)
|
| 95 |
+
],
|
| 96 |
+
outputs=[gr.Textbox(label="output")],
|
| 97 |
+
allow_flagging="never",
|
| 98 |
+
title=title,
|
| 99 |
+
description=description,
|
| 100 |
+
)
|
| 101 |
+
|
| 102 |
iface.launch(show_error=True, debug=True)
|