Spaces:
Sleeping
Sleeping
File size: 13,939 Bytes
10a5cbe 994b060 10a5cbe a633da7 10a5cbe 5787898 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | import gradio as gr
# ------------------------------------------------------------------
# ZeroGPU support
# On Hugging Face Spaces, set the Space hardware to "ZeroGPU" and the
# `spaces` package (already in requirements.txt) will hand any function
# decorated with @GPU a GPU for the duration of the call, then release
# it automatically. Locally (or on CPU-only Spaces) the import fails
# gracefully and the decorator becomes a harmless no-op.
# ------------------------------------------------------------------
try:
import spaces
GPU = spaces.GPU
except ImportError:
def GPU(func=None, **kwargs):
"""No-op fallback so the app still runs without the `spaces` package."""
if func is None:
return lambda f: f
return func
# ------------------------------------------------------------------
# DATA β edit this section to update your portfolio content
# ------------------------------------------------------------------
NAME = "Muhammad Umar Farooq"
TITLE = "AI Application Developer | Machine Learning Engineer | Computer Vision & NLP"
LOCATION = "Dera Ghazi Khan, Punjab, Pakistan"
EMAIL = "umarfarooqi6969@gmail.com"
PHONE = "+92 332 0418888"
LINKEDIN = "https://www.linkedin.com/in/muhammadumar-farooq-6964a430b"
HUGGINGFACE = "https://huggingface.co/UMAR798"
SUMMARY = (
"AI undergraduate and Machine Learning Engineer focused on building and deploying real, "
"usable Computer Vision and NLP applications with Python, PyTorch, Hugging Face, OpenCV, "
"and Streamlit. Shipped an AI Financial Advisor, a YOLOv8 object detection system (93% mAP, "
"25 FPS live video), a multilingual translator, and a deployed AI chatbot. NCEACβHEC "
"certified in Generative AI Application Development, with a track record of independently "
"designing, training, and deploying end-to-end AI products and closing the gap between "
"research and real-world use."
)
EXPERIENCE = [
{
"role": "AI Engineer (AI Frontend Engineering Intern)",
"org": "FlyRank AI",
"period": "June 2026 β Present, Pakistan",
"points": [
"Build and ship responsive, AI-powered web applications, integrating machine learning "
"and generative AI APIs into functional, user-facing products end-to-end.",
"Partner with design and engineering to translate model outputs into intuitive "
"interfaces, prioritizing UX so AI features feel native rather than bolted on.",
],
},
{
"role": "Artificial Intelligence Intern",
"org": "CodeAlpha",
"period": "June 2026 β July 2026, Remote",
"points": [
"Independently designed, trained, and deployed 3 AI projects β a conversational NLP "
"chatbot, a YOLO-based object detection system, and a multilingual AI translator.",
"Applied the full ML lifecycle per project β data preprocessing, model training, "
"testing, and evaluation β strengthening core Python, deep learning, and NLP skills.",
],
},
{
"role": "Web Developer",
"org": "Red Star LLC",
"period": "July 2025 β September 2025, Islamabad, Pakistan",
"points": [
"Built and shipped full-stack responsive websites using HTML, CSS, Bootstrap, "
"Tailwind CSS, and JavaScript, converting design mockups into production-ready code.",
"Improved integration reliability by 40% through structured REST API handling, and "
"cut bug resolution time by 25% via code review checkpoints and clean Git/GitHub "
"workflows.",
],
},
]
PROJECTS = [
{
"title": "AI Finance Advisor",
"stack": "Python Β· LangChain Β· OpenAI API Β· Flask",
"desc": "Conversational agent delivering personalized savings/financial recommendations; "
"<3s response time, 85% user satisfaction in testing.",
"emoji": "π°",
},
{
"title": "StockSense β ML Stock Prediction App",
"stack": "scikit-learn Β· Plotly Β· Gradio",
"desc": "15+ technical indicators, 3 ML models forecasting up to 90 days ahead, interactive "
"dashboard.",
"emoji": "π",
},
{
"title": "YOLOv8 Object Detection & Tracking",
"stack": "YOLO Β· OpenCV Β· PyTorch Β· Streamlit",
"desc": "Real-time detection achieving 93% mAP, processing live video at 25 FPS.",
"emoji": "π―",
},
{
"title": "AI Language Translator",
"stack": "Hugging Face Transformers",
"desc": "Multilingual translation app with a clean front end, deployed to Hugging Face "
"Spaces.",
"emoji": "π",
},
]
EDUCATION = {
"degree": "Bachelor of Technology, Artificial Intelligence",
"school": "The Islamia University of Bahawalpur",
"period": "September 2024 β June 2028",
}
CERTIFICATIONS = [
"Generative AI Application Developer β UETIANS Lahore Endowment Foundation, in "
"collaboration with NCEAC, HEC, Pak Angels, iCode Guru & Aspire Pakistan; "
"Promising Performer Award (Cohort 3), issued 30 May 2026.",
"Google AI Fundamentals",
]
SKILLS = {
"AI & ML": ["Python", "PyTorch", "TensorFlow", "Hugging Face", "Transformers", "LangChain",
"OpenAI API", "scikit-learn", "OpenCV", "YOLO/Ultralytics", "Gradio", "EDA"],
"Development": ["React", "JavaScript", "HTML/CSS", "Streamlit", "Flask", "REST APIs",
"Git & GitHub", "Pandas", "NumPy", "Plotly", "MERN Stack"],
"Tools & Platforms": ["Hugging Face Spaces", "Google Colab", "Jupyter Notebook", "VS Code"],
}
# ------------------------------------------------------------------
# THEME & STYLE
# ------------------------------------------------------------------
THEME = gr.themes.Soft(
primary_hue=gr.themes.colors.violet,
secondary_hue=gr.themes.colors.cyan,
neutral_hue=gr.themes.colors.slate,
font=[gr.themes.GoogleFont("Poppins"), "ui-sans-serif", "system-ui", "sans-serif"],
font_mono=[gr.themes.GoogleFont("JetBrains Mono"), "ui-monospace", "monospace"],
).set(
body_background_fill="*neutral_950",
body_background_fill_dark="*neutral_950",
block_background_fill="*neutral_900",
block_background_fill_dark="*neutral_900",
block_border_width="1px",
block_border_color="*neutral_800",
block_border_color_dark="*neutral_800",
block_radius="18px",
button_primary_background_fill="linear-gradient(90deg, #8b5cf6, #06b6d4)",
button_primary_background_fill_hover="linear-gradient(90deg, #7c3aed, #0891b2)",
button_primary_text_color="white",
)
CUSTOM_CSS = """
:root {
--grad-main: linear-gradient(120deg, #7c3aed 0%, #a855f7 35%, #06b6d4 100%);
}
.gradio-container {
max-width: 1080px !important;
margin: auto !important;
}
/* ---------- Hero ---------- */
#hero {
background: var(--grad-main);
border-radius: 24px;
padding: 46px 40px;
text-align: center;
box-shadow: 0 20px 45px -15px rgba(124, 58, 237, 0.55);
border: none !important;
}
#hero h1 {
color: #ffffff !important;
font-size: 2.6rem;
font-weight: 800;
margin-bottom: 6px;
letter-spacing: -0.5px;
}
#hero h3 {
color: rgba(255,255,255,0.92) !important;
font-weight: 500;
margin-top: 0;
}
#hero p {
color: rgba(255,255,255,0.85) !important;
}
#hero a { color: #fff !important; text-decoration: underline; }
/* ---------- Section headers ---------- */
.section-title h2 {
font-size: 1.5rem;
font-weight: 700;
background: var(--grad-main);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
display: inline-block;
margin-bottom: 4px;
border-bottom: 2px solid #7c3aed44;
padding-bottom: 6px;
}
/* ---------- Cards ---------- */
.card {
border-radius: 18px !important;
padding: 20px 22px !important;
transition: transform 0.2s ease, box-shadow 0.2s ease;
border: 1px solid #ffffff14 !important;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 30px -10px rgba(124, 58, 237, 0.45);
border-color: #8b5cf655 !important;
}
.card h3 { margin-top: 0; margin-bottom: 4px; font-size: 1.15rem; }
.card .stack { color: #06b6d4; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
/* ---------- Skill pills ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill {
background: linear-gradient(90deg, #7c3aed22, #06b6d422);
border: 1px solid #8b5cf655;
color: #e9d5ff;
padding: 6px 14px;
border-radius: 999px;
font-size: 0.85rem;
font-weight: 500;
}
/* ---------- Timeline ---------- */
.timeline-item {
border-left: 3px solid #8b5cf6;
padding-left: 18px;
margin-bottom: 18px;
position: relative;
}
.timeline-item::before {
content: "";
position: absolute;
left: -8px;
top: 4px;
width: 13px;
height: 13px;
border-radius: 50%;
background: var(--grad-main);
box-shadow: 0 0 0 4px #7c3aed22;
}
.timeline-item h3 { margin-bottom: 2px; }
.timeline-item .org { color: #06b6d4; font-weight: 600; }
.timeline-item .period { color: #9ca3af; font-size: 0.85rem; margin-bottom: 8px; }
/* ---------- Footer ---------- */
#footer {
text-align: center;
padding: 24px;
color: #9ca3af;
font-size: 0.9rem;
}
#footer a { color: #a855f7; }
"""
# ------------------------------------------------------------------
# HTML BUILDERS
# ------------------------------------------------------------------
def section_title(text):
return f'<div class="section-title"><h2>{text}</h2></div>'
def build_hero():
return f"""
<div id="hero">
<h1>{NAME}</h1>
<h3>{TITLE}</h3>
<p>π {LOCATION} | βοΈ <a href="mailto:{EMAIL}">{EMAIL}</a> | π {PHONE}</p>
<p>
<a href="{LINKEDIN}" target="_blank">π LinkedIn</a> |
<a href="{HUGGINGFACE}" target="_blank">π€ Hugging Face</a>
</p>
</div>
"""
def build_experience():
items = ""
for job in EXPERIENCE:
points = "".join(f"<li>{p}</li>" for p in job["points"])
items += f"""
<div class="timeline-item">
<h3>{job['role']}</h3>
<div class="org">{job['org']}</div>
<div class="period">{job['period']}</div>
<ul>{points}</ul>
</div>
"""
return items
def build_projects():
cards = ""
for p in PROJECTS:
cards += f"""
<div class="card">
<h3>{p['emoji']} {p['title']}</h3>
<div class="stack">{p['stack']}</div>
<p>{p['desc']}</p>
</div>
"""
return cards
def build_skills():
blocks = ""
for group, items in SKILLS.items():
pills = "".join(f'<span class="pill">{s}</span>' for s in items)
blocks += f"""
<div class="card" style="margin-bottom:16px;">
<h3>{group}</h3>
<div class="pill-row">{pills}</div>
</div>
"""
return blocks
def build_education_certs():
certs = "".join(f"<li>{c}</li>" for c in CERTIFICATIONS)
return f"""
<div class="card" style="margin-bottom:16px;">
<h3>π {EDUCATION['degree']}</h3>
<div class="org">{EDUCATION['school']}</div>
<div class="period">{EDUCATION['period']}</div>
</div>
<div class="card">
<h3>π Certifications</h3>
<ul>{certs}</ul>
</div>
"""
def build_footer():
return f"""
<div id="footer">
<p>Built with β€οΈ using Gradio Β· Β© {NAME} 2026</p>
<p><a href="{LINKEDIN}" target="_blank">LinkedIn</a> Β·
<a href="{HUGGINGFACE}" target="_blank">Hugging Face</a> Β·
<a href="mailto:{EMAIL}">Email</a></p>
</div>
"""
# ------------------------------------------------------------------
# CONTACT FORM HANDLER (demo only β no backend email sending)
# ------------------------------------------------------------------
@GPU
def handle_contact(name, email, message):
if not name or not email or not message:
return "β οΈ Please fill in all fields before sending."
return (
f"β
Thanks, {name}! Your message has been noted. "
f"For a direct reply, please email {EMAIL} β this demo form doesn't send real emails."
)
# ------------------------------------------------------------------
# APP
# ------------------------------------------------------------------
with gr.Blocks(theme=THEME, css=CUSTOM_CSS, title=f"{NAME} β Portfolio") as demo:
gr.HTML(build_hero())
gr.HTML(section_title("π About Me"))
gr.Markdown(SUMMARY)
gr.HTML(section_title("πΌ Work Experience"))
gr.HTML(build_experience())
gr.HTML(section_title("π Projects"))
with gr.Row():
gr.HTML(build_projects())
gr.HTML(section_title("π οΈ Skills"))
gr.HTML(build_skills())
gr.HTML(section_title("π Education & Certifications"))
gr.HTML(build_education_certs())
gr.HTML(section_title("π¬ Get In Touch"))
with gr.Row():
with gr.Column(scale=1):
contact_name = gr.Textbox(label="Your Name", placeholder="Jane Doe")
contact_email = gr.Textbox(label="Your Email", placeholder="jane@example.com")
contact_message = gr.Textbox(label="Message", lines=4, placeholder="Let's work together...")
send_btn = gr.Button("Send Message", variant="primary")
with gr.Column(scale=1):
contact_output = gr.Markdown("")
send_btn.click(
fn=handle_contact,
inputs=[contact_name, contact_email, contact_message],
outputs=contact_output,
)
gr.HTML(build_footer())
if __name__ == "__main__":
demo.launch() |