File and directory unfound

Hi, I am having a problem with my app over here, in everything was running well however when I was trying to import to, an error was shown telling me that the csv file that I’ve used for can’t be found. :face_with_head_bandage:

Here is the error:

I am a rookie who is just a few hours into streamlit, can anyone enlighten me? Thanks in advanced!

The codes

import streamlit as st 
import pandas as pd 
import pickle 
from model import features, scaler, numerical

def user_input(): 
    csv_file = st.sidebar.file_uploader(label = 'Upload your csv file here', type = ['csv'])

    if csv_file is not None: 
        df = pd.read_csv(csv_file).drop('DEATH_EVENT', axis = 1, inplace = True)
        df[numerical] = scaler.transform(df[numerical])
        user_input = df 
        age = st.sidebar.slider('Age', features['age'].min(), features['age'].max(),14.0)
        creatinine = st.sidebar.slider('Creatinine', features['creatinine_phosphokinase'].min(), features['creatinine_phosphokinase'].max(), 80.0)
        ejection_fraction = st.sidebar.slider('Ejection', features['ejection_fraction'].min(), features['ejection_fraction'].max(), 60.0)
        platelets = st.sidebar.slider('Platelets', features['platelets'].min(), features['platelets'].max(), 100000.0)
        serum_creatinine = st.sidebar.slider('Serum Creatinine', features['serum_creatinine'].min(), features['serum_creatinine'].max(), 1.19)
        serum_sodium = st.sidebar.slider('Serum Sodium', features['serum_sodium'].min(), features['serum_sodium'].max(), 131.0)
        time = st.sidebar.slider('Time', features['time'].min(), features['time'].max(), 3.0)
        diabetes = st.sidebar.selectbox('Diabetes', (1,0))
        smoking = st.sidebar.selectbox('Smoker', (1,0))
        anaemia = st.sidebar.selectbox('Anaemia', (1,0))
        sex = st.sidebar.selectbox('Sex', (1,0))
        high_blood_pressure = st.sidebar.selectbox('High BP', (1,0))

        data = {
            'platelets': platelets,
            'serum_creatinine': serum_creatinine,
            'serum_sodium': serum_sodium,
            'time': time,
            'diabetes': diabetes, 
            'smoking': smoking, 
            'anaemia': anaemia, 
            'sex': sex, 
            'high_blood_pressure': high_blood_pressure
        user_input = pd.DataFrame(data = data, index = [0])
        user_input[numerical] = scaler.transform(user_input[numerical])

    return user_input

def run_app(): 
    title = """
    # Heart Failure Prediction KNN Machine Learning Model
    This is just a simple model **without** having any serious preprocessing done!
    st.sidebar.header('Input Features')
    input_features = user_input()
if __name__ == '__main__': 

from pickle import dump
from sklearn.neighbors import KNeighborsClassifier
from sklearn.preprocessing import MinMaxScaler
import pandas as pd 

df = pd.read_csv('csv/heart_failure_clinical_records_dataset.csv')

features = df.iloc[:,:df.shape[1] - 1]
label = df['DEATH_EVENT']
numerical = ['age', 'creatinine_phosphokinase', 'ejection_fraction', 'platelets', 'serum_creatinine', 'serum_sodium', 'time']
categorical = ['sex', 'smoking', 'anaemia', 'diabetes', 'high_blood_pressure']
for feature in numerical: 
    features[feature] = features[feature].astype(float)

# Data Preprocessing: 
scaler = MinMaxScaler()
features[numerical] = scaler.fit_transform(features[numerical])

# Model 
model = KNeighborsClassifier(n_neighbors = 16), label)

# Save Model 
dump(model, open('model_knn.pkl', 'wb'))