Skip to content

Commit

Permalink
Drop id from UI
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Dec 11, 2024
1 parent 0d72632 commit fe55a78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@ def load_text_to_speech_model_and_tokenizer():
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"):
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),
Expand Down

0 comments on commit fe55a78

Please sign in to comment.