Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,6 +44,15 @@ def check_credentials(email, password):
|
|
| 44 |
except Exception as e:
|
| 45 |
print(f"Error checking credentials: {e}")
|
| 46 |
return False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
# Function to filter menu items based on preference
|
|
|
|
| 44 |
except Exception as e:
|
| 45 |
print(f"Error checking credentials: {e}")
|
| 46 |
return False
|
| 47 |
+
def load_menu():
|
| 48 |
+
"""Load menu data from an Excel file."""
|
| 49 |
+
menu_file = "menu.xlsx" # Ensure this file exists in the same directory
|
| 50 |
+
try:
|
| 51 |
+
return pd.read_excel(menu_file)
|
| 52 |
+
except FileNotFoundError:
|
| 53 |
+
raise FileNotFoundError("Menu file not found. Please ensure 'menu.xlsx' is present in the project directory.")
|
| 54 |
+
except Exception as e:
|
| 55 |
+
raise ValueError(f"Error loading menu file: {e}")
|
| 56 |
|
| 57 |
|
| 58 |
# Function to filter menu items based on preference
|