Spaces:
Running
on
Zero
Running
on
Zero
fix: Remove undefined content variable and simplify generated command display
Browse files
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"###
|
| 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
|