awacke1 commited on
Commit
5daa1d1
·
1 Parent(s): a75ebda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -46,9 +46,10 @@ def transcribe_audio(openai_key, file_path, model):
46
  data = {'file': f}
47
  response = requests.post(OPENAI_API_URL, headers=headers, files=data, data={'model': model})
48
  if response.status_code == 200:
 
49
  st.write(response.json())
50
  response2 = chat_with_model(response.json().get('text'), '') # send transcript to ChatGPT
51
- st.write('Responses:')
52
  #st.write(response)
53
  st.write(response2)
54
  return response2
@@ -75,7 +76,7 @@ if filename is not None:
75
  st.markdown('### Transcription:')
76
  st.write(transcription)
77
  #chat_with_model(transcription, '') # push transcript through as prompt
78
- response2 = chat_with_model(transcription.json().get('text'), '')
79
 
80
  def create_file(filename, prompt, response):
81
  if filename.endswith(".txt"):
 
46
  data = {'file': f}
47
  response = requests.post(OPENAI_API_URL, headers=headers, files=data, data={'model': model})
48
  if response.status_code == 200:
49
+ st.write('Reasoning with your transcription..')
50
  st.write(response.json())
51
  response2 = chat_with_model(response.json().get('text'), '') # send transcript to ChatGPT
52
+ st.write('Reasoning with your transcription..')
53
  #st.write(response)
54
  st.write(response2)
55
  return response2
 
76
  st.markdown('### Transcription:')
77
  st.write(transcription)
78
  #chat_with_model(transcription, '') # push transcript through as prompt
79
+ #response2 = chat_with_model(transcription.json().get('text'), '')
80
 
81
  def create_file(filename, prompt, response):
82
  if filename.endswith(".txt"):