Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -162,9 +162,9 @@ def process_audio_rag(audio_file_path, query, chunk_length=30, use_openai=False,
|
|
162 |
model="gpt-4o-audio-preview",
|
163 |
messages=[{"role": "user", "content": content}]
|
164 |
)
|
165 |
-
result_text += f"\
|
166 |
except Exception as e:
|
167 |
-
result_text += f"\
|
168 |
|
169 |
# Create audio visualization
|
170 |
import matplotlib.pyplot as plt
|
|
|
162 |
model="gpt-4o-audio-preview",
|
163 |
messages=[{"role": "user", "content": content}]
|
164 |
)
|
165 |
+
result_text += f"\nWritten answer: {completion.choices[0].message.content}"
|
166 |
except Exception as e:
|
167 |
+
result_text += f"\nError: {str(e)}"
|
168 |
|
169 |
# Create audio visualization
|
170 |
import matplotlib.pyplot as plt
|