Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
25 |
-
|
|
|
|
|
|
|
|
|
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
|