import streamlit as st
import pandas as pd

# Read the output.txt file and extract the x, y, and z values
with open("output.txt", "r") as f:
    data = f.read().splitlines()

values = []
for line in data:
    # Extract the values of x, y, and z from each line
    x = float(line.split(",")[0].split("=")[1].strip())
    y = float(line.split(",")[1].split("=")[1].strip())
    z = float(line.split(",")[2].split("=")[1].strip())
    
    # Add the values to a list
    values.append([x, y, z])

# Create a pandas DataFrame from the values list
df = pd.DataFrame(values, columns=["x", "y", "z"])

# Create a line chart to display the evolution of x, y, and z
st.line_chart(df)

# Create an area chart to display the evolution of x, y, and z
st.area_chart(df)
