Mpodszus commited on
Commit
553dc41
·
verified ·
1 Parent(s): 942efe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -21,7 +21,7 @@ def safe_convert(value, default, min_val, max_val):
21
  # Create the main function for the model
22
  def main_func(Department, ChainScale, SupportiveGM, Merit, LearningDevelopment, WorkEnvironment, Engagement, WellBeing):
23
 
24
- # These mappings are EXAMPLES only, not used in the model
25
  ChainScale_mapping = {
26
  'Luxury': 1,
27
  'Upper Midscale': 2,
@@ -38,7 +38,7 @@ def main_func(Department, ChainScale, SupportiveGM, Merit, LearningDevelopment,
38
  "Guest Activities": 5,
39
  }
40
 
41
- # Convert inputs to safe numeric values
42
  LearningDevelopment = safe_convert(LearningDevelopment, 3.0, 1, 5)
43
  SupportiveGM = safe_convert(SupportiveGM, 3.0, 1, 5)
44
  Merit = safe_convert(Merit, 3.0, 1, 5)
@@ -46,7 +46,7 @@ def main_func(Department, ChainScale, SupportiveGM, Merit, LearningDevelopment,
46
  Engagement = safe_convert(Engagement, 3.0, 1, 5)
47
  WellBeing = safe_convert(WellBeing, 3.0, 1, 5)
48
 
49
- # Only include model-relevant features
50
  new_row = pd.DataFrame({
51
  'SupportiveGM': [SupportiveGM],
52
  'Merit': [Merit],
@@ -112,12 +112,12 @@ with gr.Blocks(title=title) as demo:
112
  with gr.Column():
113
  Department = gr.Radio(
114
  ["Guest Services", "Food and Beverage", "Housekeeping", "Front Office Operations", "Guest Activities"],
115
- label="Department (Example Only)",
116
  value="Guest Services"
117
  )
118
  ChainScale = gr.Dropdown(
119
  ["Luxury", "Upper Midscale", "Upper Upscale", "Upscale", "Independent"],
120
- label="ChainScale (Example Only)",
121
  value="Upper Upscale"
122
  )
123
  SupportiveGM = gr.Slider(
 
21
  # Create the main function for the model
22
  def main_func(Department, ChainScale, SupportiveGM, Merit, LearningDevelopment, WorkEnvironment, Engagement, WellBeing):
23
 
24
+
25
  ChainScale_mapping = {
26
  'Luxury': 1,
27
  'Upper Midscale': 2,
 
38
  "Guest Activities": 5,
39
  }
40
 
41
+
42
  LearningDevelopment = safe_convert(LearningDevelopment, 3.0, 1, 5)
43
  SupportiveGM = safe_convert(SupportiveGM, 3.0, 1, 5)
44
  Merit = safe_convert(Merit, 3.0, 1, 5)
 
46
  Engagement = safe_convert(Engagement, 3.0, 1, 5)
47
  WellBeing = safe_convert(WellBeing, 3.0, 1, 5)
48
 
49
+
50
  new_row = pd.DataFrame({
51
  'SupportiveGM': [SupportiveGM],
52
  'Merit': [Merit],
 
112
  with gr.Column():
113
  Department = gr.Radio(
114
  ["Guest Services", "Food and Beverage", "Housekeeping", "Front Office Operations", "Guest Activities"],
115
+ label="Department",
116
  value="Guest Services"
117
  )
118
  ChainScale = gr.Dropdown(
119
  ["Luxury", "Upper Midscale", "Upper Upscale", "Upscale", "Independent"],
120
+ label="ChainScale (Example)",
121
  value="Upper Upscale"
122
  )
123
  SupportiveGM = gr.Slider(