From bf5698bd2ff76e2ec0115e06cfb54565e3c96ecf Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 11 Dec 2024 11:04:32 +0000 Subject: [PATCH] Drop id from UI --- demo/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo/app.py b/demo/app.py index f12ea8e..2562caf 100644 --- a/demo/app.py +++ b/demo/app.py @@ -116,9 +116,13 @@ def gen_button_clicked(): st.divider() st.subheader("Speaker configuration") + for s in DEFAULT_SPEAKERS: + s.pop("id", None) speakers = st.data_editor(DEFAULT_SPEAKERS, num_rows="dynamic") if st.button("Generate Podcast", on_click=gen_button_clicked): + for n, speaker in enumerate(speakers): + speaker["id"] = n system_prompt = DEFAULT_PROMPT.replace( "{SPEAKERS}", "\n".join(str(Speaker.model_validate(speaker)) for speaker in speakers),