Webui #1
+17
-1
@@ -798,6 +798,22 @@ with gr.Blocks(title="Audio-demo pipeline studio") as demo:
|
|||||||
inputs=[emotion_char_dd, emotion_word_tb, emotion_model_dd],
|
inputs=[emotion_char_dd, emotion_word_tb, emotion_model_dd],
|
||||||
outputs=[emotion_ref_audio, emotion_preview_audio, emotion_status],
|
outputs=[emotion_ref_audio, emotion_preview_audio, emotion_status],
|
||||||
)
|
)
|
||||||
|
# Dropdown choices are otherwise fixed at server-start time, so a
|
||||||
|
# character created earlier in the same running session (or by
|
||||||
|
# someone else) wouldn't show up without this - refresh
|
||||||
|
# automatically on every page load, in addition to the manual
|
||||||
|
# Refresh button above for mid-session use without reloading.
|
||||||
|
demo.load(
|
||||||
|
lambda: (gr.update(choices=character_names()), gr.update(choices=character_names())),
|
||||||
|
outputs=[char_dd, emotion_char_dd],
|
||||||
|
)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
demo.launch(server_name="0.0.0.0", server_port=7860)
|
# Gradio refuses to serve a file back to the browser unless it's under
|
||||||
|
# the app's own directory, the system temp dir, or explicitly allowed -
|
||||||
|
# every character's reference audio lives in the-service-station repo,
|
||||||
|
# a different path entirely, so every single Characters-tab selection
|
||||||
|
# errored without this (found via a real user report + the server log,
|
||||||
|
# not by inspection - the error only surfaces server-side, not in the
|
||||||
|
# browser's generic error toast).
|
||||||
|
demo.launch(server_name="0.0.0.0", server_port=7860, allowed_paths=[str(SERVICE_STATION_DIR)])
|
||||||
Reference in new issue
Block a user