noumanjavaid commited on
Commit
1fdee8e
·
verified ·
1 Parent(s): bd73897

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +55 -115
app.py CHANGED
@@ -1,18 +1,7 @@
1
  import gradio as gr
2
 
3
  css = """
4
- /* Modern theme with cool effects */
5
- :root {
6
- --primary-black: #000000;
7
- --primary-white: #ffffff;
8
- --gray-100: #f7f7f7;
9
- --gray-200: #e5e5e5;
10
- --gray-300: #d4d4d4;
11
- --gray-400: #a3a3a3;
12
- --gray-800: #262626;
13
- --gray-900: #171717;
14
- }
15
-
16
  * {
17
  margin: 0;
18
  padding: 0;
@@ -20,75 +9,60 @@ css = """
20
  }
21
 
22
  body {
 
 
23
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
24
- background-color: var(--primary-black);
25
- color: var(--primary-white);
26
  }
27
 
28
- /* Glassmorphism Header */
29
  .header {
30
- background: rgba(23, 23, 23, 0.8);
31
- backdrop-filter: blur(10px);
32
- -webkit-backdrop-filter: blur(10px);
33
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
34
- padding: 1.5rem 2rem;
35
- position: sticky;
36
- top: 0;
37
- z-index: 1000;
38
- display: flex;
39
- align-items: center;
40
- justify-content: space-between;
41
- }
42
-
43
- .logo-container {
44
  display: flex;
45
  align-items: center;
46
- gap: 1rem;
47
  }
48
 
49
  .logo {
50
  width: 45px;
51
  height: 45px;
52
- filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
53
  transition: transform 0.3s ease;
54
  }
55
 
56
  .logo:hover {
57
- transform: scale(1.1);
58
  }
59
 
60
  .header-title {
61
- color: var(--primary-white);
62
- font-size: 28px;
63
  font-weight: 600;
64
- text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
65
  }
66
 
67
- /* Main container with cool gradient */
68
  .container {
69
  max-width: 1400px;
70
  margin: 0 auto;
71
  padding: 2rem;
72
- background: linear-gradient(
73
- 135deg,
74
- rgba(38, 38, 38, 0.9) 0%,
75
- rgba(23, 23, 23, 0.9) 100%
76
- );
77
  }
78
 
79
- /* Modern Iframe container */
80
  .main-content {
81
- background: var(--gray-900);
82
- border-radius: 20px;
83
- box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
84
  margin: 2rem 0;
85
  overflow: hidden;
86
- border: 1px solid rgba(255, 255, 255, 0.1);
87
- transition: transform 0.3s ease;
88
  }
89
 
90
  .main-content:hover {
91
- transform: translateY(-5px);
 
92
  }
93
 
94
  .iframe-container {
@@ -96,7 +70,7 @@ body {
96
  width: 100%;
97
  height: 0;
98
  padding-bottom: 65%;
99
- background: var(--gray-900);
100
  }
101
 
102
  .iframe-container iframe {
@@ -106,10 +80,9 @@ body {
106
  width: 100%;
107
  height: 100%;
108
  border: none;
109
- border-radius: 20px;
110
  }
111
 
112
- /* Modern Navigation Grid */
113
  .nav-grid {
114
  display: grid;
115
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
@@ -117,120 +90,85 @@ body {
117
  margin-top: 2rem;
118
  }
119
 
120
- /* Sleek Navigation Cards */
121
  .nav-card {
122
- background: rgba(38, 38, 38, 0.5);
123
- backdrop-filter: blur(10px);
124
- -webkit-backdrop-filter: blur(10px);
125
- border-radius: 15px;
126
  padding: 1.5rem;
127
- border: 1px solid rgba(255, 255, 255, 0.1);
128
  transition: all 0.3s ease;
129
  position: relative;
130
  overflow: hidden;
131
  }
132
 
133
- .nav-card::before {
134
- content: '';
135
- position: absolute;
136
- top: 0;
137
- left: 0;
138
- width: 100%;
139
- height: 100%;
140
- background: linear-gradient(
141
- 45deg,
142
- transparent 0%,
143
- rgba(255, 255, 255, 0.05) 50%,
144
- transparent 100%
145
- );
146
- transform: translateX(-100%);
147
- transition: transform 0.6s ease;
148
- }
149
-
150
  .nav-card:hover {
151
- transform: translateY(-5px) scale(1.02);
152
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
153
- background: rgba(38, 38, 38, 0.8);
154
- }
155
-
156
- .nav-card:hover::before {
157
- transform: translateX(100%);
158
  }
159
 
160
  .nav-card a {
161
- color: var(--primary-white);
162
  text-decoration: none;
163
  font-weight: 500;
164
  font-size: 1.1rem;
165
  display: flex;
166
  align-items: center;
167
  gap: 0.8rem;
168
- position: relative;
169
  }
170
 
171
  .nav-card a::after {
172
  content: '→';
173
- position: absolute;
174
- right: 0;
175
  opacity: 0;
176
- transform: translateX(-10px);
177
- transition: all 0.3s ease;
178
  }
179
 
180
  .nav-card:hover a::after {
181
  opacity: 1;
182
- transform: translateX(0);
183
  }
184
 
185
  /* Hide Gradio elements */
186
- footer, .gradio-container {
187
  display: none !important;
188
  }
189
 
190
- /* Cool loading animation */
191
- @keyframes pulse {
192
- 0% { opacity: 0.5; }
193
- 50% { opacity: 1; }
194
- 100% { opacity: 0.5; }
195
- }
196
-
197
- .loading {
198
- animation: pulse 1.5s infinite;
199
  }
200
 
201
- /* Modern scrollbar */
202
  ::-webkit-scrollbar {
203
  width: 8px;
204
- height: 8px;
205
  }
206
 
207
  ::-webkit-scrollbar-track {
208
- background: var(--gray-900);
209
  }
210
 
211
  ::-webkit-scrollbar-thumb {
212
- background: var(--gray-400);
213
  border-radius: 4px;
214
  }
215
 
216
  ::-webkit-scrollbar-thumb:hover {
217
- background: var(--gray-300);
218
  }
219
  """
220
 
221
  with gr.Blocks(css=css, title="Centurion Analysis Platform") as demo:
222
- # Modern Header
223
  with gr.Row(elem_classes=["header"]):
224
- with gr.Column(elem_classes=["logo-container"]):
225
- gr.Image(
226
- "https://raw.githubusercontent.com/noumanjavaid96/ai-as-an-api/refs/heads/master/image%20(39).png",
227
- elem_classes=["logo"],
228
- show_label=False,
229
- container=False
230
- )
231
- gr.Markdown("Centurion Analysis", elem_classes=["header-title"])
232
 
233
- # Main Content
234
  with gr.Row(elem_classes=["container"]):
235
  with gr.Column(elem_classes=["main-content"]):
236
  gr.HTML('''
@@ -239,7 +177,7 @@ with gr.Blocks(css=css, title="Centurion Analysis Platform") as demo:
239
  </div>
240
  ''')
241
 
242
- # Navigation Cards
243
  with gr.Row(elem_classes=["nav-grid"]):
244
  gr.HTML('''
245
  <div class="nav-card">
@@ -271,5 +209,7 @@ if __name__ == "__main__":
271
  demo.launch(
272
  show_error=True,
273
  show_api=False,
 
274
  height=800,
275
- )
 
 
1
  import gradio as gr
2
 
3
  css = """
4
+ /* Base styles */
 
 
 
 
 
 
 
 
 
 
 
5
  * {
6
  margin: 0;
7
  padding: 0;
 
9
  }
10
 
11
  body {
12
+ background-color: #ffffff;
13
+ color: #000000;
14
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
 
 
15
  }
16
 
17
+ /* Header styles */
18
  .header {
19
+ background: #ffffff;
20
+ border-bottom: 1px solid #e5e5e5;
21
+ padding: 1rem 2rem;
 
 
 
 
 
 
 
 
 
 
 
22
  display: flex;
23
  align-items: center;
24
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
25
  }
26
 
27
  .logo {
28
  width: 45px;
29
  height: 45px;
30
+ margin-right: 15px;
31
  transition: transform 0.3s ease;
32
  }
33
 
34
  .logo:hover {
35
+ transform: scale(1.05);
36
  }
37
 
38
  .header-title {
39
+ color: #000000;
40
+ font-size: 24px;
41
  font-weight: 600;
 
42
  }
43
 
44
+ /* Main container */
45
  .container {
46
  max-width: 1400px;
47
  margin: 0 auto;
48
  padding: 2rem;
49
+ background: #ffffff;
 
 
 
 
50
  }
51
 
52
+ /* Iframe container */
53
  .main-content {
54
+ background: #ffffff;
55
+ border-radius: 12px;
56
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
57
  margin: 2rem 0;
58
  overflow: hidden;
59
+ border: 1px solid #e5e5e5;
60
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
61
  }
62
 
63
  .main-content:hover {
64
+ transform: translateY(-2px);
65
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
66
  }
67
 
68
  .iframe-container {
 
70
  width: 100%;
71
  height: 0;
72
  padding-bottom: 65%;
73
+ background: #ffffff;
74
  }
75
 
76
  .iframe-container iframe {
 
80
  width: 100%;
81
  height: 100%;
82
  border: none;
 
83
  }
84
 
85
+ /* Navigation grid */
86
  .nav-grid {
87
  display: grid;
88
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
 
90
  margin-top: 2rem;
91
  }
92
 
93
+ /* Navigation cards */
94
  .nav-card {
95
+ background: #ffffff;
96
+ border: 1px solid #e5e5e5;
97
+ border-radius: 10px;
 
98
  padding: 1.5rem;
 
99
  transition: all 0.3s ease;
100
  position: relative;
101
  overflow: hidden;
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  .nav-card:hover {
105
+ transform: translateY(-5px);
106
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
107
+ border-color: #000000;
 
 
 
 
108
  }
109
 
110
  .nav-card a {
111
+ color: #000000;
112
  text-decoration: none;
113
  font-weight: 500;
114
  font-size: 1.1rem;
115
  display: flex;
116
  align-items: center;
117
  gap: 0.8rem;
 
118
  }
119
 
120
  .nav-card a::after {
121
  content: '→';
 
 
122
  opacity: 0;
123
+ margin-left: auto;
124
+ transition: opacity 0.3s ease;
125
  }
126
 
127
  .nav-card:hover a::after {
128
  opacity: 1;
 
129
  }
130
 
131
  /* Hide Gradio elements */
132
+ footer {
133
  display: none !important;
134
  }
135
 
136
+ .gradio-container {
137
+ margin: 0 !important;
138
+ padding: 0 !important;
 
 
 
 
 
 
139
  }
140
 
141
+ /* Custom scrollbar */
142
  ::-webkit-scrollbar {
143
  width: 8px;
 
144
  }
145
 
146
  ::-webkit-scrollbar-track {
147
+ background: #f1f1f1;
148
  }
149
 
150
  ::-webkit-scrollbar-thumb {
151
+ background: #888;
152
  border-radius: 4px;
153
  }
154
 
155
  ::-webkit-scrollbar-thumb:hover {
156
+ background: #555;
157
  }
158
  """
159
 
160
  with gr.Blocks(css=css, title="Centurion Analysis Platform") as demo:
161
+ # Header
162
  with gr.Row(elem_classes=["header"]):
163
+ gr.Image(
164
+ "https://raw.githubusercontent.com/noumanjavaid96/ai-as-an-api/refs/heads/master/image%20(39).png",
165
+ elem_classes=["logo"],
166
+ show_label=False,
167
+ container=False
168
+ )
169
+ gr.Markdown("Centurion Analysis", elem_classes=["header-title"])
 
170
 
171
+ # Main content
172
  with gr.Row(elem_classes=["container"]):
173
  with gr.Column(elem_classes=["main-content"]):
174
  gr.HTML('''
 
177
  </div>
178
  ''')
179
 
180
+ # Navigation cards
181
  with gr.Row(elem_classes=["nav-grid"]):
182
  gr.HTML('''
183
  <div class="nav-card">
 
209
  demo.launch(
210
  show_error=True,
211
  show_api=False,
212
+ show_tips=False,
213
  height=800,
214
+ enable_queues=False
215
+ )