GattoNero commited on
Commit
9d5fec9
·
verified ·
1 Parent(s): 962d9a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -92,19 +92,19 @@ class BasicAgent:
92
 
93
  if file_info.endswith((".png", ".jpg", ".jpeg")):
94
  print("coso Image file detected, processing with GPT-4o")
95
- image = self._load_image(file_data)
96
  response = self._ask_gpt4o_with_image(image, text)
97
  return response
98
 
99
  elif file_info.endswith(".wav") or file_name.endswith(".mp3"):
100
  print("coso Audio file detected, processing with Whisper")
101
- audio_bytes = self._load_bytes(file_data)
102
  transcription = self._transcribe_audio(audio_bytes)
103
  return self._ask_gpt4o(transcription)
104
 
105
  elif file_info.endswith(".txt"):
106
  print("coso Text file detected")
107
- text_content = self._load_text(file_data)
108
  return self._ask_gpt4o(text_content)
109
 
110
 
 
92
 
93
  if file_info.endswith((".png", ".jpg", ".jpeg")):
94
  print("coso Image file detected, processing with GPT-4o")
95
+ image = self._load_image(file_info)
96
  response = self._ask_gpt4o_with_image(image, text)
97
  return response
98
 
99
  elif file_info.endswith(".wav") or file_name.endswith(".mp3"):
100
  print("coso Audio file detected, processing with Whisper")
101
+ audio_bytes = self._load_bytes(file_info)
102
  transcription = self._transcribe_audio(audio_bytes)
103
  return self._ask_gpt4o(transcription)
104
 
105
  elif file_info.endswith(".txt"):
106
  print("coso Text file detected")
107
+ text_content = self._load_text(file_info)
108
  return self._ask_gpt4o(text_content)
109
 
110