File size: 447 Bytes
dfe0ad3
 
 
112a2a9
dfe0ad3
 
 
 
6ea260a
dfe0ad3
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import matplotlib.pyplot as plt
import io
from PIL import Image

def update_dashboard_plot(log_data):
    # Sample data visualization
    labels = ["Solution 1", "Solution 2"]
    values = [log_data.count("1"), log_data.count("2")]

    fig, ax = plt.subplots()
    ax.bar(labels, values)
    ax.set_title("Feedback Summary")

    buf = io.BytesIO()
    plt.savefig(buf, format='png')
    buf.seek(0)
    plt.close(fig)
    return Image.open(buf)