Spaces:
Running
Running
Update pages.py
Browse files
pages.py
CHANGED
@@ -49,7 +49,7 @@ def sidebar_fragment():
|
|
49 |
|
50 |
@st.fragment
|
51 |
def specify_audio_fragment():
|
52 |
-
col1, col2, col3 = st.columns([
|
53 |
|
54 |
with col1:
|
55 |
audio_sample_names = [audio_sample_name for audio_sample_name in AUDIO_SAMPLES_W_INSTRUCT.keys()]
|
@@ -121,7 +121,7 @@ def specify_audio_fragment():
|
|
121 |
f"**Example Instruction {i+1}**: {inst}",
|
122 |
args=(inst,),
|
123 |
disabled=st.session_state.disprompt,
|
124 |
-
on_click=lambda p: st.session_state.update(disprompt=True, new_prompt=p, on_click_button=True)
|
125 |
)
|
126 |
|
127 |
if st.session_state.on_click_button:
|
@@ -142,7 +142,7 @@ def dialogue_section():
|
|
142 |
if chat_input := st.chat_input(
|
143 |
placeholder="Type Your Instruction Here",
|
144 |
disabled=st.session_state.disprompt,
|
145 |
-
on_submit=lambda: st.session_state.update(disprompt=True)
|
146 |
):
|
147 |
st.session_state.new_prompt = chat_input
|
148 |
|
@@ -200,4 +200,4 @@ def audio_llm():
|
|
200 |
)
|
201 |
|
202 |
specify_audio_fragment()
|
203 |
-
dialogue_section()
|
|
|
49 |
|
50 |
@st.fragment
|
51 |
def specify_audio_fragment():
|
52 |
+
col1, col2, col3 = st.columns([4, 2, 2])
|
53 |
|
54 |
with col1:
|
55 |
audio_sample_names = [audio_sample_name for audio_sample_name in AUDIO_SAMPLES_W_INSTRUCT.keys()]
|
|
|
121 |
f"**Example Instruction {i+1}**: {inst}",
|
122 |
args=(inst,),
|
123 |
disabled=st.session_state.disprompt,
|
124 |
+
on_click=lambda p: st.session_state.update(disprompt=True, new_prompt=p, on_click_button=True, messages=[])
|
125 |
)
|
126 |
|
127 |
if st.session_state.on_click_button:
|
|
|
142 |
if chat_input := st.chat_input(
|
143 |
placeholder="Type Your Instruction Here",
|
144 |
disabled=st.session_state.disprompt,
|
145 |
+
on_submit=lambda: st.session_state.update(disprompt=True, messages=[])
|
146 |
):
|
147 |
st.session_state.new_prompt = chat_input
|
148 |
|
|
|
200 |
)
|
201 |
|
202 |
specify_audio_fragment()
|
203 |
+
dialogue_section()
|