update this code so I can specify the both the framerate and duration of the mp4 and gif
```
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation, PillowWriter

print("beginning render")
# Load data from csv
data = pd.read_csv(
    "results.csv",
    names=[
        "model_name",
        "dataset_path",
        "device",
        "lines",
        "execution_time",
        "rate",
        "timestamp",
        "system",
        "machine",
        "processor",
        "cpu_info",
        "unique_device_id",
        "power_info",
    ],
)

# Create a new 3D figure for the lines vs rate vs execution_time plot
fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")

# Iterate over devices
for device in data["device"].unique():
    device_data = data[data["device"] == device]

    # 3D scatter plot for lines, rate, and execution time for each device
    ax.scatter(
        device_data["lines"],
        device_data["rate"],
        device_data["execution_time"],
        label=device,
    )

    # # Calculate curve of best fit (surface in 3D)
    # z = np.polyfit(device_data["lines"], device_data["rate"], 2)
    # p = np.poly1d(z)
    # ax.plot(
    #     device_data["lines"],
    #     p(device_data["lines"]),
    #     device_data["execution_time"],
    #     label=f"{device} Best Fit",
    # )

ax.set_xlabel("Number of Sentences")
ax.set_ylabel("Rate (lines/s)")
ax.set_zlabel("Execution Time (seconds)")
ax.set_title("Number of Sentences, Rate, and Execution Time")
ax.legend()

# Save the 3D plot
plt.savefig("lines_rate_execution_time.png", dpi=300)

# Save plot as SVG
plt.savefig("lines_rate_execution_time.svg")


# Define the animation function
def animate(i):
    ax.view_init(elev=10.0, azim=i)


# Create an animation
ani = FuncAnimation(fig, animate, frames=360, interval=100)

# Save the animation as gif
ani.save("3d_plot_animation.gif", writer=PillowWriter(fps=60))

# Save the animation as mp4 video file
ani.save("3d_plot_animation.mp4", writer="ffmpeg")

print("finished render")
``` The words with all capital letters should appear at least 4 times.
user