AI Fitness & Nutrition Tracker GUI in Python | Modern GUI App
Demo :
Click Video 👇👇👇
Description:
Build a stunning AI-powered Fitness & Nutrition Tracker using Python and Tkinter with a modern stylish dashboard UI. 💪 Track workouts, meals, and progress all in one place.
-
Features:
-
AI-generated workout & meal plans
-
Modern sidebar navigation
-
Stylish GUI using Tkinter
-
Beginner-friendly
-
-
Created By: FuzzuTech
Code :
import tkinter as tkfrom tkinter import ttkfrom PIL import Image, ImageTk# Main App Windowclass FitnessApp(tk.Tk):def __init__(self):super().__init__()self.title("AI Fitness & Nutrition Tracker")# self.geometry("900x600")self.geometry("650x600")self.configure(bg="#1e1e2f")self.resizable(False, False)self.setup_ui()def setup_ui(self):self.create_sidebar()self.create_dashboard()def create_sidebar(self):sidebar = tk.Frame(self, bg="#2c2f48", width=200)sidebar.pack(side="left", fill="y")logo = tk.Label(sidebar, text="Fuzzu Fit", fg="white", bg="#2c2f48",font=("Helvetica", 18, "bold"))logo.pack(pady=20)buttons = ["Dashboard", "Workout Plan", "Nutrition", "Progress"]for btn in buttons:b = tk.Button(sidebar, text=btn, bg="#383b5b", fg="white",font=("Helvetica", 12), relief="flat",command=lambda name=btn: self.switch_content(name))b.pack(pady=10, fill="x", padx=10)def create_dashboard(self):self.content = tk.Frame(self, bg="#1e1e2f")self.content.pack(expand=True, fill="both")self.update_dashboard()def switch_content(self, name):for widget in self.content.winfo_children():widget.destroy()if name == "Dashboard":self.update_dashboard()elif name == "Workout Plan":self.show_workout_plan()elif name == "Nutrition":self.show_nutrition()elif name == "Progress":self.show_progress()def update_dashboard(self):tk.Label(self.content, text="Welcome to Your Fitness Dashboard!",bg="#1e1e2f", fg="white", font=("Helvetica", 20, "bold")).pack(pady=40)stats = [("Calories Burned", "2450"),("Steps Today", "8,120"),("Workout Completed", "3/5"),("Water Intake", "1.5L")]for stat in stats:frame = tk.Frame(self.content, bg="#2c2f48", bd=0)frame.pack(pady=10, padx=20, fill="x")tk.Label(frame, text=stat[0], bg="#2c2f48", fg="white", font=("Helvetica", 14)).pack(side="left", padx=10)tk.Label(frame, text=stat[1], bg="#2c2f48", fg="#4dd0e1", font=("Helvetica", 14, "bold")).pack(side="right", padx=10)def show_workout_plan(self):tk.Label(self.content, text="Today's AI-Generated Workout Plan:",bg="#1e1e2f", fg="white", font=("Helvetica", 18)).pack(pady=20)plan = ["10 min Warm-up", "15 min HIIT", "10 min Strength", "5 min Cooldown"]for item in plan:tk.Label(self.content, text=f"• {item}", bg="#1e1e2f", fg="#c5e1a5", font=("Helvetica", 14)).pack(anchor="w", padx=20)def show_nutrition(self):tk.Label(self.content, text="Today's Meal Suggestions:",bg="#1e1e2f", fg="white", font=("Helvetica", 18)).pack(pady=20)meals = ["Breakfast: Oatmeal + Banana", "Lunch: Grilled Chicken Salad", "Snack: Greek Yogurt", "Dinner: Veg Stir Fry"]for meal in meals:tk.Label(self.content, text=f"• {meal}", bg="#1e1e2f", fg="#ffcc80", font=("Helvetica", 14)).pack(anchor="w", padx=20)def show_progress(self):tk.Label(self.content, text="Your Weekly Progress:",bg="#1e1e2f", fg="white", font=("Helvetica", 18)).pack(pady=20)tk.Label(self.content, text="(Coming Soon: Visual Graphs and Insights)",bg="#1e1e2f", fg="#90caf9", font=("Helvetica", 14)).pack(pady=10)if __name__ == "__main__":app = FitnessApp()app.mainloop()
Comments
Post a Comment