Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,7 @@ def analyze_audio(audio_file, system_prompt):
|
|
| 143 |
try:
|
| 144 |
out = pipe(
|
| 145 |
{"audio": audio, "turns": turns, "sampling_rate": sr},
|
| 146 |
-
max_new_tokens=
|
| 147 |
)
|
| 148 |
text = out[0].get("generated_text", str(out)) if isinstance(out, list) and out else str(out)
|
| 149 |
return f"β
Processed.\n\n{text}"
|
|
@@ -174,7 +174,8 @@ with gr.Blocks(title="Ultravox v0.6 (8B) β Audio Analyzer", theme=gr.themes.So
|
|
| 174 |
system_prompt = gr.Textbox(
|
| 175 |
label="π§ Analysis Instructions (what should the AI analyze in the audio?)",
|
| 176 |
value="You are a helpful assistant that analyzes the audio and describes what it contains.",
|
| 177 |
-
lines=
|
|
|
|
| 178 |
)
|
| 179 |
submit_btn = gr.Button("π Analyze", variant="primary")
|
| 180 |
|
|
|
|
| 143 |
try:
|
| 144 |
out = pipe(
|
| 145 |
{"audio": audio, "turns": turns, "sampling_rate": sr},
|
| 146 |
+
max_new_tokens=1000, # increased for longer, more detailed responses
|
| 147 |
)
|
| 148 |
text = out[0].get("generated_text", str(out)) if isinstance(out, list) and out else str(out)
|
| 149 |
return f"β
Processed.\n\n{text}"
|
|
|
|
| 174 |
system_prompt = gr.Textbox(
|
| 175 |
label="π§ Analysis Instructions (what should the AI analyze in the audio?)",
|
| 176 |
value="You are a helpful assistant that analyzes the audio and describes what it contains.",
|
| 177 |
+
lines=8,
|
| 178 |
+
max_lines=20,
|
| 179 |
)
|
| 180 |
submit_btn = gr.Button("π Analyze", variant="primary")
|
| 181 |
|