gunnerforlife52 commited on
Commit
7d514e3
Β·
verified Β·
1 Parent(s): 42c17ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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=200, # adjust if you want longer/shorter answers
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=3,
 
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