Update app.py
Browse files
app.py
CHANGED
|
@@ -50,16 +50,6 @@ def main():
|
|
| 50 |
topic = st.selectbox("Choose a programming topic", developer_topics)
|
| 51 |
user_input = st.text_area("Or ask a programming-related question:", "")
|
| 52 |
|
| 53 |
-
# Audio file uploader
|
| 54 |
-
uploaded_file = st.file_uploader("Upload an audio file for transcription", type=["m4a", "mp3", "wav"])
|
| 55 |
-
|
| 56 |
-
# If an audio file is uploaded, transcribe it and use the transcription for querying
|
| 57 |
-
if uploaded_file is not None:
|
| 58 |
-
st.write("Transcribing the audio...")
|
| 59 |
-
transcription = transcribe_audio(uploaded_file)
|
| 60 |
-
st.write("Transcribed text:")
|
| 61 |
-
st.write(transcription)
|
| 62 |
-
|
| 63 |
# Use the transcribed text as the query for the chatbot if no custom query was provided
|
| 64 |
query = transcription if not user_input else user_input
|
| 65 |
|
|
|
|
| 50 |
topic = st.selectbox("Choose a programming topic", developer_topics)
|
| 51 |
user_input = st.text_area("Or ask a programming-related question:", "")
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
# Use the transcribed text as the query for the chatbot if no custom query was provided
|
| 54 |
query = transcription if not user_input else user_input
|
| 55 |
|