Web Development
& Deploying AI
models in
Production
Session 5
Facilitated by:
Rabiya Kulsum
Senior Lecturer
Email: rabiyak@regenesys.net
REGENESYS’ Integrated Leadership and
Management model
Holistic focus on the individual
(SQ, EQ, IQ, and PQ)
Interrelationships are dynamic
between individual, team,
institution and the external
environment (systemic)
Strategy affects individual, team,
organisational, and environmental
performance
Delivery requires alignment of
strategy, structure, systems and
culture
REGENESYS’ Graduate Attribute
Ground Rules
Active Listening
Listen attentively, understand, and respond effectively
Respectful Communication
Communicate openly and respectfully with your peers and facilitators
Come Prepared
Arrive with the necessary information and materials for productive discussions
Be on Time
Respect others' time and be punctual for all engagements
Embrace Challenges
View challenges as opportunities for growth and learning
Follow Online Etiquettes
Adhere to respectful and professional behavior in virtual learning
Have fun and enjoy the learning!
Ground Rules
Active Listening
Listen attentively, understand, and respond effectively
Respectful Communication
Communicate openly and respectfully with your peers and facilitators
Come Prepared
Arrive with the necessary information and materials for productive discussions
Be on Time
Respect others' time and be punctual for all engagements
Embrace Challenges
View challenges as opportunities for growth and learning
Follow Online Etiquettes
Adhere to respectful and professional behavior in virtual learning
Have fun and enjoy the learning!
Learning Objectives
• Understand what Flask is and why it's used
• Learn to install Flask
• Create basic routes using @app.route
• Use render_template() for HTML rendering
• Pass data from HTML to Flask backend
• Build a titanic machine learning model
What is Flask?
• A lightweight Python web framework
• Used for building web apps quickly and simply
• Micro-framework (no ORM or form handling by default)
Why Flask?
• Simplicity - great for beginners
• Extensibility - can grow with your needs
• Minimalist approach - only includes what you need
• Strong community support
• Python-based (leverage existing Python knowledge)
Use cases of Flask
• Small to medium-sized web applications
• APIs and web services
• Prototyping
• Learning web development concepts
• Example applications: dashboards, personal blogs, simple APIs
Installing Flask
pip install flask
Open terminal/command prompt
• Create a Python file: app.py
• Run Flask app:
flask run
Visit: http://127.0.0.1:5000 to access the app
Creating Flask App
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return "Hello, Flask!"
Creating Routes
@app.route('/about')
def about():
return "About Page"
• Flask maps URLs to Python functions
• Multiple routes = multiple views
Rendering Templates
• Create templates/ folder
• Add index.html:
<h1>Welcome, {{ name }}!</h1>
Summary
• Flask is great for small-to-medium web apps
• We created routes, used templates, and processed form input

Web dev -ppt that helps us understand web technology

  • 1.
    Web Development & DeployingAI models in Production Session 5 Facilitated by: Rabiya Kulsum Senior Lecturer Email: rabiyak@regenesys.net
  • 2.
    REGENESYS’ Integrated Leadershipand Management model Holistic focus on the individual (SQ, EQ, IQ, and PQ) Interrelationships are dynamic between individual, team, institution and the external environment (systemic) Strategy affects individual, team, organisational, and environmental performance Delivery requires alignment of strategy, structure, systems and culture
  • 3.
  • 4.
    Ground Rules Active Listening Listenattentively, understand, and respond effectively Respectful Communication Communicate openly and respectfully with your peers and facilitators Come Prepared Arrive with the necessary information and materials for productive discussions Be on Time Respect others' time and be punctual for all engagements Embrace Challenges View challenges as opportunities for growth and learning Follow Online Etiquettes Adhere to respectful and professional behavior in virtual learning Have fun and enjoy the learning!
  • 5.
    Ground Rules Active Listening Listenattentively, understand, and respond effectively Respectful Communication Communicate openly and respectfully with your peers and facilitators Come Prepared Arrive with the necessary information and materials for productive discussions Be on Time Respect others' time and be punctual for all engagements Embrace Challenges View challenges as opportunities for growth and learning Follow Online Etiquettes Adhere to respectful and professional behavior in virtual learning Have fun and enjoy the learning!
  • 6.
    Learning Objectives • Understandwhat Flask is and why it's used • Learn to install Flask • Create basic routes using @app.route • Use render_template() for HTML rendering • Pass data from HTML to Flask backend • Build a titanic machine learning model
  • 7.
    What is Flask? •A lightweight Python web framework • Used for building web apps quickly and simply • Micro-framework (no ORM or form handling by default)
  • 8.
    Why Flask? • Simplicity- great for beginners • Extensibility - can grow with your needs • Minimalist approach - only includes what you need • Strong community support • Python-based (leverage existing Python knowledge)
  • 9.
    Use cases ofFlask • Small to medium-sized web applications • APIs and web services • Prototyping • Learning web development concepts • Example applications: dashboards, personal blogs, simple APIs
  • 10.
    Installing Flask pip installflask Open terminal/command prompt • Create a Python file: app.py • Run Flask app: flask run Visit: http://127.0.0.1:5000 to access the app
  • 11.
    Creating Flask App fromflask import Flask app = Flask(__name__) @app.route('/') def home(): return "Hello, Flask!" Creating Routes @app.route('/about') def about(): return "About Page" • Flask maps URLs to Python functions • Multiple routes = multiple views
  • 12.
    Rendering Templates • Createtemplates/ folder • Add index.html: <h1>Welcome, {{ name }}!</h1>
  • 13.
    Summary • Flask isgreat for small-to-medium web apps • We created routes, used templates, and processed form input