import matplotlib.pyplot as plt import numpy as np accuracy = [] f = open("metrics.txt", "r") for line in f: parts = line.strip().split(' ') if(parts[0] == 'Accuracy:'): accuracy.append(float(parts[1])) y_values = np.arange(1, len(accuracy) + 1) plt.plot(y_values, accuracy, marker='o', linestyle='-', color='b') plt.xlabel('Build Number') plt.ylabel('Accuracy') plt.title('Accuracy Plot') plt.grid(True) plt.show() plt.savefig('accuracy.png')