simonraj commited on
Commit
a73412a
·
1 Parent(s): e8f9b13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -13,17 +13,8 @@ def image_to_base64(img_path):
13
 
14
  img_base64 = image_to_base64("HongWenSBC.JPG")
15
  img_html = f'<img src="data:image/jpg;base64,{img_base64}" alt="SBC6" width="300" style="display: block; margin: auto;"/>'
16
-
17
- def predict(question_choice, audio):
18
- # Transcribe the audio using Whisper
19
- with open(audio, "rb") as audio_file:
20
- transcript = openai.Audio.transcribe("whisper-1", audio_file)
21
- message = transcript["text"] # This is the transcribed message from the audio input
22
 
23
- # Generate the system message based on the chosen question
24
- strategy, explanation = HongWenData.strategy_text["TREES"]
25
-
26
- def predict(question_choice, audio):
27
  # Transcribe the audio using Whisper
28
  with open(audio, "rb") as audio_file:
29
  transcript = openai.Audio.transcribe("whisper-1", audio_file)
 
13
 
14
  img_base64 = image_to_base64("HongWenSBC.JPG")
15
  img_html = f'<img src="data:image/jpg;base64,{img_base64}" alt="SBC6" width="300" style="display: block; margin: auto;"/>'
 
 
 
 
 
 
16
 
17
+ def predict(question_choice, audio):
 
 
 
18
  # Transcribe the audio using Whisper
19
  with open(audio, "rb") as audio_file:
20
  transcript = openai.Audio.transcribe("whisper-1", audio_file)