victor HF staff commited on
Commit
d0774e8
·
1 Parent(s): 8b5b445

fix: Remove undefined content variable and simplify generated command display

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -285,11 +285,9 @@ def update(
285
  f"\n=== EXECUTING FFMPEG COMMAND ===\nffmpeg {' '.join(final_command[1:])}\n"
286
  )
287
  subprocess.run(final_command, cwd=temp_dir)
288
- # Store the full model response for display
289
- model_response = content.strip()
290
  # Extract just the command for display
291
  command_for_display = f"ffmpeg {' '.join(args[1:])} -y output.mp4"
292
- generated_command = f"### Model Analysis\n{model_response}\n\n### Generated Command\n```bash\n{command_for_display}\n```"
293
  return output_file_path, gr.update(value=generated_command)
294
  except Exception as e:
295
  attempts += 1
 
285
  f"\n=== EXECUTING FFMPEG COMMAND ===\nffmpeg {' '.join(final_command[1:])}\n"
286
  )
287
  subprocess.run(final_command, cwd=temp_dir)
 
 
288
  # Extract just the command for display
289
  command_for_display = f"ffmpeg {' '.join(args[1:])} -y output.mp4"
290
+ generated_command = f"### Generated Command\n```bash\n{command_for_display}\n```"
291
  return output_file_path, gr.update(value=generated_command)
292
  except Exception as e:
293
  attempts += 1