From 4efce005f79a57912f5699e719e850d9feff2fdd Mon Sep 17 00:00:00 2001
From: Dhruvang Patel <dhruvang.patel@stud.th-deg.de>
Date: Sun, 26 Jan 2025 12:05:52 +0100
Subject: [PATCH] Update app.py

---
 app.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/app.py b/app.py
index 0510bee1..6f93737c 100644
--- a/app.py
+++ b/app.py
@@ -3,9 +3,9 @@ import streamlit as st
 import altair as alt
 import os
 from sklearn.preprocessing import LabelEncoder
-import joblib  # For loading Scikit-Learn models
+import joblib  
+
 
-# Load the dataset
 df = pd.read_csv("FakeDataset.csv")
 
 # Load Scikit-Learn models
@@ -23,7 +23,7 @@ if not os.path.exists("country_code_encoder.pkl"):
         country_code_encoder = LabelEncoder()
         df["Airport Country Code"] = country_code_encoder.fit_transform(df["Airport Country Code"])
 
-        # Save the encoder for future use
+        
         joblib.dump(country_code_encoder, "country_code_encoder.pkl")
         st.success("Country code encoder has been created and saved as 'country_code_encoder.pkl'.")
     else:
@@ -39,7 +39,7 @@ if not os.path.exists("airport_encoder.pkl"):
         airport_encoder = LabelEncoder()
         df["Arrival Airport"] = airport_encoder.fit_transform(df["Arrival Airport"])
 
-        # Save the encoder for future use
+       
         joblib.dump(airport_encoder, "airport_encoder.pkl")
         st.success("Airport encoder has been created and saved as 'airport_encoder.pkl'.")
     else:
@@ -48,19 +48,19 @@ else:
     # Load the encoder if it already exists
     airport_encoder = joblib.load("airport_encoder.pkl")
 
-# Initialize Streamlit
+# Starting Streamlit
 st.title("Airline Chatbot & Data Explorer with Predictions")
 
 # Adding the Bot image
 st.image("Chatbot_image.gif", caption="Welcome to the Airline Chatbot & Data Explorer!", use_container_width=True)
 
-# Add navigation
+# Added navigation
 menu = st.sidebar.selectbox("Select a Feature", ["Chatbot", "Data Explorer", "Visualizations", "Predictions"])
 
 def show_chatbot_section():
     st.subheader("Chat with Airline Assistant")
 
-    # Initialize session states for conversation flow
+    # Initialize different states for conversation flow
     if "greeted" not in st.session_state:
         st.session_state.greeted = False
     if "help_query" not in st.session_state:
@@ -98,7 +98,7 @@ def show_chatbot_section():
             else:
                 st.info("Let me know how I can assist you further.")
 
-    # Passenger ID and Last Name functionality
+    # Passenger ID and Last Name Input functionality
     if st.session_state.help_query and not st.session_state.details_fetched:
         passenger_id = st.text_input("Please enter your Passenger ID:")
         last_name = st.text_input("Please enter your Last Name:")
-- 
GitLab