sreelekhaputta2 commited on
Commit
d763b87
·
verified ·
1 Parent(s): 0360828

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +135 -0
app.py ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !pip install gradio==5.4.1 -q
2
+
3
+ import gradio as gr
4
+
5
+ projects = [
6
+ {"name": "Idealyze", "desc": "AI-powered content optimization platform", "skills": ["NLP", "Transformers", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Idealyze", "video": "Idealyze.mp4"},
7
+ {"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"},
8
+ {"name": "GenDoc_AI", "desc": "Intelligent PDF document generation", "skills": ["LLMs", "PDF Generation", "LangChain"], "live": "https://huggingface.co/spaces/sreelekhaputta2/GenDoc_AI", "video": "GendocAI.mp4"},
9
+ {"name": "LinkShield", "desc": "Advanced URL security threat detection", "skills": ["Cybersecurity", "API Integration", "FastAPI"], "live": "https://huggingface.co/spaces/sreelekhaputta2/LinkShield", "video": "Linkshield.mp4"},
10
+ {"name": "Chatbot", "desc": "Multi-modal conversational AI with memory", "skills": ["LLMs", "RAG", "Vector DB"], "live": "https://huggingface.co/spaces/sreelekhaputta2/Chatbot", "video": "Wiseverse.mp4"},
11
+ {"name": "AvatarVerse", "desc": "Photorealistic AI avatar generator", "skills": ["Stable Diffusion", "ControlNet", "GANs"], "live": "https://huggingface.co/spaces/sreelekhaputta2/AvatarVerse", "video": "Avatarverse.mp4"}
12
+ ]
13
+
14
+ css = """
15
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
16
+ * { font-family: 'Inter', sans-serif !important; }
17
+ body { margin: 0 !important; padding: 0 !important; overflow-x: hidden !important; }
18
+ .gradio-container { background: none !important; min-height: 100vh !important; }
19
+
20
+ #pexels-bg {
21
+ position: fixed !important;
22
+ top: 0 !important;
23
+ left: 0 !important;
24
+ width: 100vw !important;
25
+ height: 100vh !important;
26
+ object-fit: cover !important;
27
+ z-index: -2 !important;
28
+ pointer-events: none !important;
29
+ }
30
+
31
+ .pexels-overlay {
32
+ position: fixed !important;
33
+ top: 0 !important;
34
+ left: 0 !important;
35
+ width: 100vw !important;
36
+ height: 100vh !important;
37
+ background: linear-gradient(rgba(15,15,35,0.85), rgba(45,27,105,0.85)) !important;
38
+ z-index: -1 !important;
39
+ }
40
+
41
+ .glass-card {
42
+ background: rgba(255, 255, 255, 0.15) !important;
43
+ backdrop-filter: blur(25px) !important;
44
+ border: 1px solid rgba(255, 255, 255, 0.2) !important;
45
+ border-radius: 24px !important;
46
+ box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important;
47
+ }
48
+
49
+ .center-content {
50
+ display: flex !important;
51
+ flex-direction: column !important;
52
+ align-items: center !important;
53
+ text-align: center !important;
54
+ justify-content: center !important;
55
+ }
56
+
57
+ .demo-btn {
58
+ background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
59
+ border: none !important;
60
+ border-radius: 16px !important;
61
+ color: white !important;
62
+ font-weight: 600 !important;
63
+ padding: 1.2rem 2.5rem !important;
64
+ font-size: 1.1rem !important;
65
+ width: 100% !important;
66
+ max-width: 350px !important;
67
+ margin: 1rem auto !important;
68
+ transition: all 0.3s ease !important;
69
+ text-decoration: none !important;
70
+ display: inline-block !important;
71
+ text-align: center !important;
72
+ }
73
+
74
+ .demo-btn:hover {
75
+ transform: scale(1.05) !important;
76
+ box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4) !important;
77
+ }
78
+
79
+ .video-medium {
80
+ height: 350px !important;
81
+ max-width: 100% !important;
82
+ width: 650px !important;
83
+ border-radius: 16px !important;
84
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
85
+ }
86
+
87
+ .header-gradient {
88
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
89
+ border-radius: 24px !important;
90
+ padding: 3rem !important;
91
+ text-align: center !important;
92
+ box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4) !important;
93
+ margin: 2rem auto !important;
94
+ max-width: 800px !important;
95
+ }
96
+ """
97
+
98
+ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
99
+ # Pexels AI video background (direct URL)
100
+ gr.HTML('''
101
+ <video id="pexels-bg" autoplay muted loop playsinline preload="auto">
102
+ <source src="https://player.vimeo.com/video/992653370?h=25744121&autoplay=1&loop=1&muted=1&background=1" type="video/mp4">
103
+ </video>
104
+ <div class="pexels-overlay"></div>
105
+ ''')
106
+
107
+ gr.Markdown(
108
+ "# ✨ **AI/ML Projects**\n\n**6 Production-Ready Projects • Live on Hugging Face**",
109
+ elem_classes="header-gradient glass-card center-content"
110
+ )
111
+
112
+ with gr.Tabs():
113
+ for proj in projects:
114
+ with gr.TabItem(proj["name"]):
115
+ with gr.Column(elem_classes="glass-card center-content"):
116
+ gr.Markdown(f"# 🚀 **{proj['name']}**")
117
+ gr.Markdown(f"**📝 {proj['desc']}**")
118
+ gr.Markdown(f"**🛠️ Tech Stack:** {' • '.join(proj['skills'])}")
119
+
120
+ gr.HTML(f'''
121
+ <a href="{proj["live"]}" target="_blank" class="demo-btn">
122
+ 🎮 Launch {proj['name']} Live Demo
123
+ </a>
124
+ ''')
125
+
126
+ gr.Video(
127
+ value=proj["video"],
128
+ label="📹 Project Demo",
129
+ height=350,
130
+ show_download_button=True,
131
+ interactive=False,
132
+ elem_classes="video-medium"
133
+ )
134
+
135
+ demo.launch(share=True, debug=True, height=950, show_error=True)