Spaces:
Build error
Build error
| # graph_generator.py | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def generate_frequency_graph(frequency_data, output_path): | |
| """ | |
| Function to generate a graph based on frequencies of the mantra chant. | |
| """ | |
| plt.figure(figsize=(10, 6)) | |
| plt.plot(frequency_data, label="Chant Frequency") | |
| plt.title("Chant Frequency Pattern") | |
| plt.xlabel("Time") | |
| plt.ylabel("Amplitude") | |
| plt.legend() | |
| plt.grid(True) | |
| # Save the graph to the specified output path | |
| plt.savefig(output_path) | |
| plt.close() | |