simonraj commited on
Commit
28aefcd
·
1 Parent(s): 10103a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -21,8 +21,12 @@ def predict(question_choice, audio):
21
  transcript = openai.Audio.transcribe("whisper-1", audio_file)
22
  message = transcript["text"] # This is the transcribed message from the audio input
23
 
24
- # Generate the system message based on the chosen question
25
- system_message = RadinMas.generate_system_message(question_choice)
 
 
 
 
26
 
27
  # Reference to the picture description from RadinMas.py
28
  picture_description = RadinMas.description
 
21
  transcript = openai.Audio.transcribe("whisper-1", audio_file)
22
  message = transcript["text"] # This is the transcribed message from the audio input
23
 
24
+ # Determine question number based on question_choice
25
+ question_number = RadinMas.questions.index(question_choice) + 1 # New line
26
+
27
+ # Generate the system message based on the question number
28
+ system_message = RadinMas.generate_system_message(question_number) # Updated line
29
+
30
 
31
  # Reference to the picture description from RadinMas.py
32
  picture_description = RadinMas.description