Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,38 +1,179 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
projects = [
|
| 5 |
{"name": "Idealyze", "desc": "AI-powered content optimization platform", "skills": ["NLP", "Transformers", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Idealyze", "video": "Idealyze.mp4"},
|
| 6 |
{"name": "DivineLoop", "desc": "Real-time audio-visual looping generator", "skills": ["Audio Processing", "Computer Vision", "WebRTC"], "live": "https://huggingface.co/spaces/sreelekhaputta2/DivineLoop", "video": "Divineloop.mp4"},
|
| 7 |
{"name": "GenDoc_AI", "desc": "Intelligent PDF document generation", "skills": ["LLMs", "PDF Generation", "LangChain"], "live": "https://huggingface.co/spaces/sreelekhaputta2/GenDoc_AI", "video": "GendocAI.mp4"},
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
]
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 14 |
gr.Markdown(
|
| 15 |
-
"# ✨ **AI/ML Projects**\n\n**6 Production-Ready Projects • Live on Hugging Face**",
|
| 16 |
elem_classes="header-gradient glass-card center-content"
|
| 17 |
)
|
| 18 |
|
|
|
|
| 19 |
with gr.Tabs(elem_classes="center-content"):
|
| 20 |
for proj in projects:
|
| 21 |
with gr.TabItem(proj["name"]):
|
| 22 |
with gr.Column(elem_classes="glass-card center-content", scale=1):
|
|
|
|
| 23 |
gr.Markdown(f"# 🚀 **{proj['name']}**")
|
|
|
|
|
|
|
| 24 |
gr.Markdown(f"**📝 {proj['desc']}**")
|
|
|
|
|
|
|
| 25 |
gr.Markdown(f"**🛠️ Tech Stack:** {' • '.join(proj['skills'])}")
|
| 26 |
|
|
|
|
| 27 |
gr.HTML(f'''
|
| 28 |
-
<div style="text-align:center;">
|
| 29 |
-
<a href="{proj[
|
| 30 |
🎮 Launch {proj['name']} Live Demo
|
| 31 |
</a>
|
| 32 |
-
<
|
| 33 |
-
<
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
</div>
|
| 36 |
''')
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
| 1 |
+
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
projects = [
|
| 5 |
{"name": "Idealyze", "desc": "AI-powered content optimization platform", "skills": ["NLP", "Transformers", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Idealyze", "video": "Idealyze.mp4"},
|
| 6 |
{"name": "DivineLoop", "desc": "Real-time audio-visual looping generator", "skills": ["Audio Processing", "Computer Vision", "WebRTC"], "live": "https://huggingface.co/spaces/sreelekhaputta2/DivineLoop", "video": "Divineloop.mp4"},
|
| 7 |
{"name": "GenDoc_AI", "desc": "Intelligent PDF document generation", "skills": ["LLMs", "PDF Generation", "LangChain"], "live": "https://huggingface.co/spaces/sreelekhaputta2/GenDoc_AI", "video": "GendocAI.mp4"},
|
| 8 |
+
{"name": "LinkShield", "desc": "Advanced URL security threat detection", "skills": ["Cybersecurity", "API Integration", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/LinkShield", "video": "Linkshield.mp4"},
|
| 9 |
+
{"name": "Chatbot", "desc": "Multi-modal conversational AI with memory", "skills": ["LLMs", "RAG", "Vector DB"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Chatbot", "video": "Wiseverse.mp4"},
|
| 10 |
+
{"name": "AvatarVerse", "desc": "Photorealistic AI avatar generator", "skills": ["Stable Diffusion", "ControlNet", "GANs"], "live": "https://huggingface.co/spaces/sreelekhaputta2/AvatarVerse", "video": "Avatarverse.mp4"}
|
| 11 |
]
|
| 12 |
|
| 13 |
+
css = """
|
| 14 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
| 15 |
+
|
| 16 |
+
/* PERFECT BACKGROUND */
|
| 17 |
+
.gradio-container {
|
| 18 |
+
background: linear-gradient(rgba(10,10,26,0.92), rgba(45,27,105,0.92)),
|
| 19 |
+
url('https://tse4.explicit.bing.net/th/id/OIP.CSOmF_Va1tPzTClwWuugnwHaEK?pid=Api&h=220&P=0') center/cover no-repeat !important;
|
| 20 |
+
font-family: 'Inter', sans-serif !important;
|
| 21 |
+
min-height: 100vh !important;
|
| 22 |
+
color: white !important;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* FORCE WHITE TEXT EVERYWHERE - LIGHT/DARK THEME SAFE */
|
| 26 |
+
* {
|
| 27 |
+
font-family: 'Inter', sans-serif !important;
|
| 28 |
+
color: white !important;
|
| 29 |
+
}
|
| 30 |
+
body {
|
| 31 |
+
margin: 0 !important;
|
| 32 |
+
padding: 0 !important;
|
| 33 |
+
overflow-x: hidden !important;
|
| 34 |
+
background: transparent !important;
|
| 35 |
+
color: white !important;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
/* MOBILE PERFECT CENTERING */
|
| 39 |
+
.center-content {
|
| 40 |
+
display: flex !important;
|
| 41 |
+
flex-direction: column !important;
|
| 42 |
+
align-items: center !important;
|
| 43 |
+
justify-content: center !important;
|
| 44 |
+
text-align: center !important;
|
| 45 |
+
width: 100% !important;
|
| 46 |
+
max-width: 100% !important;
|
| 47 |
+
margin: 0 auto !important;
|
| 48 |
+
padding: 1rem !important;
|
| 49 |
+
box-sizing: border-box !important;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
/* GLASSMORPHISM CARDS */
|
| 53 |
+
.glass-card {
|
| 54 |
+
background: rgba(255, 255, 255, 0.25) !important;
|
| 55 |
+
backdrop-filter: blur(30px) !important;
|
| 56 |
+
border: 1px solid rgba(255, 255, 255, 0.4) !important;
|
| 57 |
+
border-radius: 24px !important;
|
| 58 |
+
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6) !important;
|
| 59 |
+
color: white !important;
|
| 60 |
+
padding: 2rem !important;
|
| 61 |
+
margin: 1rem auto !important;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/* PERFECT BUTTONS */
|
| 65 |
+
.demo-btn {
|
| 66 |
+
background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
|
| 67 |
+
border: none !important;
|
| 68 |
+
border-radius: 16px !important;
|
| 69 |
+
color: white !important;
|
| 70 |
+
font-weight: 600 !important;
|
| 71 |
+
padding: 1.2rem 2.5rem !important;
|
| 72 |
+
font-size: 1.1rem !important;
|
| 73 |
+
width: 100% !important;
|
| 74 |
+
max-width: 350px !important;
|
| 75 |
+
margin: 1rem auto !important;
|
| 76 |
+
transition: all 0.3s ease !important;
|
| 77 |
+
text-decoration: none !important;
|
| 78 |
+
display: inline-block !important;
|
| 79 |
+
text-align: center !important;
|
| 80 |
+
line-height: 1.5 !important;
|
| 81 |
+
box-shadow: 0 10px 30px rgba(255,107,107,0.4) !important;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.demo-btn:hover {
|
| 85 |
+
transform: scale(1.05) !important;
|
| 86 |
+
box-shadow: 0 20px 40px rgba(255, 107, 107, 0.6) !important;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/* FAST LOADING VIDEOS */
|
| 90 |
+
.video-container video {
|
| 91 |
+
width: 100% !important;
|
| 92 |
+
max-height: 350px !important;
|
| 93 |
+
border-radius: 16px !important;
|
| 94 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
|
| 95 |
+
margin-top: 1rem !important;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
/* HEADER */
|
| 99 |
+
.header-gradient {
|
| 100 |
+
background: linear-gradient(135deg, rgba(102,126,234,0.95), rgba(118,75,162,0.95)) !important;
|
| 101 |
+
border-radius: 24px !important;
|
| 102 |
+
padding: 3rem 2rem !important;
|
| 103 |
+
text-align: center !important;
|
| 104 |
+
box-shadow: 0 25px 50px rgba(102, 126, 234, 0.5) !important;
|
| 105 |
+
margin: 2rem auto !important;
|
| 106 |
+
max-width: 90% !important;
|
| 107 |
+
color: white !important;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
/* TABS WHITE */
|
| 111 |
+
.gradio-tabs, .tab-header, .tab-content { color: white !important; }
|
| 112 |
+
.tab-button { color: white !important; }
|
| 113 |
+
|
| 114 |
+
/* MOBILE PERFECTION */
|
| 115 |
+
@media (max-width: 768px) {
|
| 116 |
+
.gradio-container { padding: 0.5rem !important; }
|
| 117 |
+
.center-content {
|
| 118 |
+
padding: 1rem !important;
|
| 119 |
+
margin: 0 !important;
|
| 120 |
+
width: 100vw !important;
|
| 121 |
+
max-width: 100vw !important;
|
| 122 |
+
}
|
| 123 |
+
.demo-btn {
|
| 124 |
+
padding: 1rem 1.5rem !important;
|
| 125 |
+
font-size: 1rem !important;
|
| 126 |
+
max-width: 90vw !important;
|
| 127 |
+
}
|
| 128 |
+
.video-container video {
|
| 129 |
+
max-height: 280px !important;
|
| 130 |
+
width: 100% !important;
|
| 131 |
+
}
|
| 132 |
+
.header-gradient {
|
| 133 |
+
padding: 2rem 1rem !important;
|
| 134 |
+
margin: 1rem 0 !important;
|
| 135 |
+
max-width: 95vw !important;
|
| 136 |
+
}
|
| 137 |
+
.glass-card { padding: 1.5rem 1rem !important; }
|
| 138 |
+
}
|
| 139 |
+
"""
|
| 140 |
|
| 141 |
with gr.Blocks(css=css) as demo:
|
| 142 |
+
# HEADER
|
| 143 |
gr.Markdown(
|
| 144 |
+
"# ✨ **AI/ML Projects**\n\n**6 Production-Ready Projects • Live on Hugging Face Spaces**",
|
| 145 |
elem_classes="header-gradient glass-card center-content"
|
| 146 |
)
|
| 147 |
|
| 148 |
+
# TABS
|
| 149 |
with gr.Tabs(elem_classes="center-content"):
|
| 150 |
for proj in projects:
|
| 151 |
with gr.TabItem(proj["name"]):
|
| 152 |
with gr.Column(elem_classes="glass-card center-content", scale=1):
|
| 153 |
+
# PROJECT TITLE
|
| 154 |
gr.Markdown(f"# 🚀 **{proj['name']}**")
|
| 155 |
+
|
| 156 |
+
# DESCRIPTION
|
| 157 |
gr.Markdown(f"**📝 {proj['desc']}**")
|
| 158 |
+
|
| 159 |
+
# TECH STACK
|
| 160 |
gr.Markdown(f"**🛠️ Tech Stack:** {' • '.join(proj['skills'])}")
|
| 161 |
|
| 162 |
+
# LIVE DEMO BUTTON + ULTRA-FAST VIDEO
|
| 163 |
gr.HTML(f'''
|
| 164 |
+
<div style="text-align:center; width:100%;">
|
| 165 |
+
<a href="{proj['live']}" target="_blank" class="demo-btn" style="text-decoration:none;">
|
| 166 |
🎮 Launch {proj['name']} Live Demo
|
| 167 |
</a>
|
| 168 |
+
<div class="video-container">
|
| 169 |
+
<video controls preload="metadata"
|
| 170 |
+
style="width:100%; max-height:350px; border-radius:16px; margin-top:1rem; box-shadow:0 20px 40px rgba(0,0,0,0.4);">
|
| 171 |
+
<source src="{proj['video']}" type="video/mp4">
|
| 172 |
+
Video not supported
|
| 173 |
+
</video>
|
| 174 |
+
</div>
|
| 175 |
</div>
|
| 176 |
''')
|
| 177 |
|
| 178 |
+
# LAUNCH WITH SHARE LINK
|
| 179 |
+
demo.launch(share=True, debug=True, height=950, show_error=True)
|