text: import streamlit as st
  
  import formulas
  from markdown import Markdown as md
  
  md.removeWatermark()
  
  st.title("Fit Tracker")
  
  with st.sidebar:
  
      st.header("Tracker Entry")
  
      st.subheader("How old are you?")
      age = st.number_input("Age", 13, 130, 18)
  
      st.subheader("What is your sex?")
      sex = st.radio("Sex", ("Male", "Female"))
  
      st.subheader("How tall are you?")
      feet_height = st.number_input("Feet", 4, 8, 6)
      inches_height = st.number_input("Inches", 0, 11)
      total_height = (feet_height * 12) + inches_height
  
      st.subheader("How much do you weight?")
      total_weight = st.number_input("Weight", 100, 400, 150)
  
      st.subheader("How active are you each day?")
      activity_level = st.selectbox(
          "Activity Level", ("Sedentary", "Lightly Active", "Moderately Active", "Very Active", "Extremely Active"))
  
      st.subheader("What is your fitness goal?")
      fitness_goal = st.radio(
          "Fitness Goal", ("Maintain Current Weight", "Lose Weight/Body Fat", "Build Muscle"))
  
      if fitness_goal == "Lose Weight/Body Fat":
          st.subheader("How much weight do you want to lose in a week?")
          offset_weight = st.radio("Pounds", (-1, -2))
  
          st.subheader("What is your ideal weight?")
          ideal_weight = st.number_input("Ideal Weight", 100, total_weight)
      elif fitness_goal == "Maintain Current Weight":
          offset_weight = 0
          approx_duration = 0
          ideal_weight = 0
      elif fitness_goal == "Build Muscle":
          st.subheader("How much weight do you want to gain in a week?")
          offset_weight = st.radio("Pounds", (1, 2))
  
          st.subheader("What is your ideal weight?")
          ideal_weight = st.number_input("Ideal Weight", total_weight, 400)
  
  results_container = st.container()
  with results_container:
      f = formulas.Formulas(age, sex, total_height,
                            total_weight, ideal_weight, activity_level)
  
      st.header("Personalized Results")
      bmi = f.getBMI()
  
      if sex == "Male":
          body_fat = f.getBodyFat(16.2)
          bmr = f.getBMR(66.47, 6.24, 12.7, 6.755)
      elif sex == "Female":
          body_fat = f.getBodyFat(5.4)
          bmr = f.getBMR(655.1, 4.35, 4.7, 4.7)
  
      if fitness_goal == "Maintain Current Weight":
          adj_caloric_intake = f.getCaloricIntake()
      else:
          adj_caloric_intake = f.getAdjCaloricIntake(offset_weight)
          approx_duration = f.getApproxDuration(offset_weight)
  
      col1, col2, col3, col4 = st.columns(4)
  
      col1.metric("Body Fat Percentage", str(round(body_fat)) + "%")
      col2.metric("Body Mass Index", round(bmi))
      col3.metric("Basal Metabolic Rate", round(bmr))
      col4.metric("Caloric Intake", round(adj_caloric_intake))
      if round(approx_duration) > 0:
          st.metric("Approximate Duration", round(approx_duration))
  
  info_container = st.container()
  with info_container:
      st.header("Additional Information")
      md.markdownExpander()
  