StreamlitAPIException: set_page_config() can only be called once per app error

I’m getting the following error when I tried running the following code. I couldn’t find a way to fix the issue.

StreamlitAPIException: set_page_config() can only be called once per app, and must be called as the first Streamlit command in your script.

import pandas as pd
import streamlit as st

st.title("Sephora vs Ulta")

def set_page_config():
    """Sets the page configuration.
        page_title="Sephora vs Ulta",

def read_sephora_data():
    """Reads the data from the csv file and returns a pandas dataframe.
    path = "Sephora.csv"
    read_sephora = pd.read_csv(path)
    return read_sephora

sephora = read_sephora_data()

def display_mean_price(data):
    """Displays the mean price of the products.
    mean_price = data["price"].mean()
    return round(mean_price, 2)

def display_median_price(data):
    """Displays the median price of the products.
    median_price = data["price"].median()
    return median_price

#Row A

a1,a2 = st.columns(2)
a1.metric("Mean Price", display_mean_price(sephora))
a2.metric("Median Price", display_median_price(sephora))```

st.set_page_config must be the first streamlit call in the file, therefore put it above the st.title