shukdevdatta123 commited on
Commit
7162728
·
verified ·
1 Parent(s): 0cfe2ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
- import pandas as pd
3
  import openai
4
- from text_speech_utils import * # Assuming this module exists for your audio functionality
5
 
6
  # Define filenames for audio and conversation output
7
  input_audio_filename = 'input.wav'
@@ -44,11 +43,6 @@ if st.button('Record audio'):
44
  else:
45
  st.error("API key is required to interact with GPT.")
46
 
47
- # # Download conversation button
48
- # st.download_button(label="Download conversation",
49
- # data=pd.DataFrame(st.session_state['messages']).to_csv(index=False).encode('utf-8'),
50
- # file_name=output_conversation_filename)
51
-
52
  # Function to generate conversation as plain text
53
  def generate_conversation_text(messages):
54
  conversation_text = ""
@@ -67,4 +61,4 @@ st.download_button(
67
  data=generate_conversation_text(st.session_state['messages']).encode('utf-8'),
68
  file_name=output_conversation_filename,
69
  mime="text/plain"
70
- )
 
1
  import streamlit as st
 
2
  import openai
3
+ from text_speech_utils import * # Import the updated functions
4
 
5
  # Define filenames for audio and conversation output
6
  input_audio_filename = 'input.wav'
 
43
  else:
44
  st.error("API key is required to interact with GPT.")
45
 
 
 
 
 
 
46
  # Function to generate conversation as plain text
47
  def generate_conversation_text(messages):
48
  conversation_text = ""
 
61
  data=generate_conversation_text(st.session_state['messages']).encode('utf-8'),
62
  file_name=output_conversation_filename,
63
  mime="text/plain"
64
+ )