Spaces:
Running
Running
Update pages.py
Browse files
pages.py
CHANGED
@@ -67,7 +67,7 @@ def audio_llm():
|
|
67 |
st.session_state.default_instruction = ""
|
68 |
|
69 |
st.markdown("**Model Configuration:**")
|
70 |
-
col4, col5
|
71 |
|
72 |
with col4:
|
73 |
st.slider(label='Temperature', min_value=0.0, max_value=2.0, value=0.7, key='temperature')
|
@@ -77,7 +77,7 @@ def audio_llm():
|
|
77 |
|
78 |
col1, col2, col3 = st.columns(3)
|
79 |
|
80 |
-
with
|
81 |
st.markdown("**Record Audio:**")
|
82 |
|
83 |
recording = mic_recorder(
|
@@ -91,7 +91,7 @@ def audio_llm():
|
|
91 |
st.session_state.audio_base64 = base64.b64encode(audio_bytes).decode('utf-8')
|
92 |
st.session_state.audio_array = bytes_to_array(audio_bytes)
|
93 |
|
94 |
-
with
|
95 |
st.markdown("**Upload Audio:**")
|
96 |
|
97 |
uploaded_file = st.file_uploader(
|
@@ -107,7 +107,7 @@ def audio_llm():
|
|
107 |
st.session_state.audio_base64 = base64.b64encode(audio_bytes).decode('utf-8')
|
108 |
st.session_state.audio_array = bytes_to_array(audio_bytes)
|
109 |
|
110 |
-
with
|
111 |
audio_samples_w_instruct = {
|
112 |
'1_ASR_IMDA_PART1_ASR_v2_141' : "- Turn the spoken language into a text format.\n\n- Please translate the content into Chinese.",
|
113 |
'2_ASR_IMDA_PART1_ASR_v2_2258': "- Turn the spoken language into a text format.\n\n- Please translate the content into Chinese.",
|
|
|
67 |
st.session_state.default_instruction = ""
|
68 |
|
69 |
st.markdown("**Model Configuration:**")
|
70 |
+
col4, col5 = st.columns(2)
|
71 |
|
72 |
with col4:
|
73 |
st.slider(label='Temperature', min_value=0.0, max_value=2.0, value=0.7, key='temperature')
|
|
|
77 |
|
78 |
col1, col2, col3 = st.columns(3)
|
79 |
|
80 |
+
with col2:
|
81 |
st.markdown("**Record Audio:**")
|
82 |
|
83 |
recording = mic_recorder(
|
|
|
91 |
st.session_state.audio_base64 = base64.b64encode(audio_bytes).decode('utf-8')
|
92 |
st.session_state.audio_array = bytes_to_array(audio_bytes)
|
93 |
|
94 |
+
with col3:
|
95 |
st.markdown("**Upload Audio:**")
|
96 |
|
97 |
uploaded_file = st.file_uploader(
|
|
|
107 |
st.session_state.audio_base64 = base64.b64encode(audio_bytes).decode('utf-8')
|
108 |
st.session_state.audio_array = bytes_to_array(audio_bytes)
|
109 |
|
110 |
+
with col1:
|
111 |
audio_samples_w_instruct = {
|
112 |
'1_ASR_IMDA_PART1_ASR_v2_141' : "- Turn the spoken language into a text format.\n\n- Please translate the content into Chinese.",
|
113 |
'2_ASR_IMDA_PART1_ASR_v2_2258': "- Turn the spoken language into a text format.\n\n- Please translate the content into Chinese.",
|