Spaces:
Sleeping
Sleeping
File size: 6,570 Bytes
d763b87 32d2751 d763b87 32d2751 d763b87 e0de4ba 0295a0d 32d2751 4c076e4 32d2751 0295a0d 32d2751 0295a0d 32d2751 0295a0d 303f442 c70af96 0295a0d c70af96 0295a0d c70af96 0295a0d 32d2751 0295a0d 4c076e4 0295a0d 32d2751 0295a0d 4c076e4 c70af96 0295a0d c70af96 f6987da 32d2751 aee1c72 0295a0d 32d2751 47f1c92 0295a0d f6987da 4c076e4 e0de4ba a51484e f6987da 36461fb 0295a0d 32d2751 0295a0d c70af96 0295a0d 32d2751 0295a0d d763b87 32d2751 0295a0d a51484e 47f1c92 48bf197 0295a0d c70af96 a51484e 32d2751 0295a0d 66d0a97 f6987da 47f1c92 a896acf |
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 |
import gradio as gr
import os
projects = [
{"name": "Idealyze", "desc": "AI-powered content optimization platform", "skills": ["NLP", "Transformers", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Idealyze", "video": "Idealyze.mp4"},
{"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"},
{"name": "GenDoc_AI", "desc": "Intelligent PDF document generation", "skills": ["LLMs", "PDF Generation", "LangChain"], "live": "https://huggingface.co/spaces/sreelekhaputta2/GenDoc_AI", "video": "GendocAI.mp4"},
{"name": "LinkShield", "desc": "Advanced URL security threat detection", "skills": ["Cybersecurity", "API Integration", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/LinkShield", "video": "Linkshield.mp4"},
{"name": "Chatbot", "desc": "Multi-modal conversational AI with memory", "skills": ["LLMs", "RAG", "Vector DB"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Chatbot", "video": "Wiseverse.mp4"},
{"name": "AvatarVerse", "desc": "Photorealistic AI avatar generator", "skills": ["Stable Diffusion", "ControlNet", "GANs"], "live": "https://huggingface.co/spaces/sreelekhaputta2/AvatarVerse", "video": "Avatarverse.mp4"}
]
css = """
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
* { font-family: 'Inter', sans-serif !important; }
body {
margin: 0 !important;
padding: 0 !important;
overflow-x: hidden !important;
}
.gradio-container {
background: none !important;
position: relative !important;
min-height: 100vh !important;
}
#background-video {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
object-fit: cover !important;
z-index: -2 !important;
pointer-events: none !important;
}
.video-overlay {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
background: linear-gradient(rgba(15,15,35,0.85), rgba(45,27,105,0.85)) !important;
z-index: -1 !important;
}
.glass-card {
background: rgba(255, 255, 255, 0.15) !important;
backdrop-filter: blur(25px) !important;
border: 1px solid rgba(255, 255, 255, 0.2) !important;
border-radius: 24px !important;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important;
}
.center-content {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
text-align: center !important;
justify-content: center !important;
}
.demo-btn {
background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
border: none !important;
border-radius: 16px !important;
color: white !important;
font-weight: 600 !important;
padding: 1.2rem 2.5rem !important;
font-size: 1.1rem !important;
width: 100% !important;
max-width: 350px !important;
margin: 1rem auto !important;
transition: all 0.3s ease !important;
text-decoration: none !important;
display: inline-block !important;
text-align: center !important;
}
.demo-btn:hover {
transform: scale(1.05) !important;
box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4) !important;
}
.video-medium {
height: 350px !important;
max-width: 100% !important;
width: 650px !important;
border-radius: 16px !important;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}
.header-gradient {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
border-radius: 24px !important;
padding: 2.5rem !important;
text-align: center !important;
box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4) !important;
}
@media (max-width: 768px) {
.demo-btn { padding: 1rem 2rem !important; font-size: 1rem !important; }
.video-medium { height: 280px !important; width: 100% !important; }
}
"""
def get_video_file(video_path):
"""Returns the video file if it exists, otherwise returns None"""
if os.path.exists(video_path):
return video_path
return None
with gr.Blocks() as demo:
# Background Video
gr.HTML("""
<video autoplay muted loop id="background-video" preload="auto">
<source src="bg.mp4" type="video/mp4">
</video>
<div class="video-overlay"></div>
""")
# Centered Header
with gr.Row(variant="compact", elem_classes="center-content"):
gr.HTML("""
<div class="header-gradient glass-card">
<h1 style="margin: 0; font-weight: 800; font-size: 3rem; background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;">
โจ AI/ML Projects
</h1>
<p style="margin: 1rem 0 0 0; font-size: 1.3rem; opacity: 0.9;">
6 Production-Ready Projects โข Live on Hugging Face
</p>
</div>
""")
# Project Tabs
with gr.Tabs():
for proj in projects:
with gr.TabItem(proj["name"]):
with gr.Column(elem_classes="glass-card center-content"):
gr.Markdown(f"# ๐ **{proj['name']}**")
gr.Markdown(f"**๐ {proj['desc']}**")
gr.Markdown(f"**๐ ๏ธ Tech Stack:** {' โข '.join(proj['skills'])}")
gr.HTML(f'''
<a href="{proj["live"]}" target="_blank" class="demo-btn" style="display: inline-block; text-align: center; line-height: 1.5;">
๐ฎ Launch {proj['name']} Live Demo
</a>
''')
# Video Component - using Gradio's built-in Video component
video_file = get_video_file(proj["video"])
if video_file:
gr.Video(
value=video_file,
label="๐น Project Demo",
height=350,
interactive=False,
elem_classes="video-medium"
)
else:
gr.HTML(f"<div style='padding: 20px; text-align: center; color: #fff;'><p>๐น Video file not found: {proj['video']}</p></div>")
demo.launch(share=True) |