arpit13 commited on
Commit
e8e5865
·
verified ·
1 Parent(s): 64ac3b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -7
app.py CHANGED
@@ -40,7 +40,7 @@ interface = gr.Interface(
40
  title="DTECTIFY, The Object Detection with Counts",
41
  description="Upload an image and let Detectify detect and count objects in real-time. Get annotated results with bounding boxes and an instant count of objects by category. Fast, accurate, and easy-to-use for all your object detection needs!",
42
  css="""
43
- /* Overall body and background settings */
44
  body {
45
  font-family: 'Arial', sans-serif;
46
  background: linear-gradient(135deg, #FF6F61, #FF9F9F, #FFEB3B);
@@ -53,7 +53,7 @@ interface = gr.Interface(
53
  justify-content: center;
54
  align-items: center;
55
  text-align: center;
56
- overflow-y: auto; /* Enable scrolling */
57
  }
58
 
59
  @keyframes gradientBG {
@@ -62,15 +62,15 @@ interface = gr.Interface(
62
  100% { background-position: 0% 50%; }
63
  }
64
 
65
- /* Container styling for the interface */
66
  .gradio-container {
67
  background: rgba(0, 0, 0, 0.5);
68
  border-radius: 20px;
69
  padding: 30px;
70
  width: 100%;
71
- max-width: 900px; /* Slightly larger for better compatibility */
72
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
73
- overflow-y: auto; /* Make content inside the container scrollable */
74
  animation: fadeIn 1s ease-out;
75
  }
76
 
@@ -84,13 +84,14 @@ interface = gr.Interface(
84
  }
85
  }
86
 
87
- /* Header styles */
88
  .gradio-header {
89
  font-size: 2.5rem;
90
  font-weight: bold;
91
  color: #FFEB3B;
92
  }
93
 
 
94
  .gradio-description {
95
  font-size: 1.2rem;
96
  color: #ffffff;
@@ -101,7 +102,7 @@ interface = gr.Interface(
101
  margin-right: auto;
102
  }
103
 
104
- /* Button styles with hover effect */
105
  .gr-button {
106
  background: linear-gradient(90deg, #4CAF50, #FFC107);
107
  color: white;
@@ -113,6 +114,7 @@ interface = gr.Interface(
113
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
114
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
115
  margin-top: 20px;
 
116
  }
117
 
118
  .gr-button:hover {
@@ -171,6 +173,13 @@ interface = gr.Interface(
171
  width: 100%;
172
  }
173
  }
 
 
 
 
 
 
 
174
  """
175
  )
176
 
 
40
  title="DTECTIFY, The Object Detection with Counts",
41
  description="Upload an image and let Detectify detect and count objects in real-time. Get annotated results with bounding boxes and an instant count of objects by category. Fast, accurate, and easy-to-use for all your object detection needs!",
42
  css="""
43
+ /* General body and background settings */
44
  body {
45
  font-family: 'Arial', sans-serif;
46
  background: linear-gradient(135deg, #FF6F61, #FF9F9F, #FFEB3B);
 
53
  justify-content: center;
54
  align-items: center;
55
  text-align: center;
56
+ overflow-y: auto;
57
  }
58
 
59
  @keyframes gradientBG {
 
62
  100% { background-position: 0% 50%; }
63
  }
64
 
65
+ /* Main container styles */
66
  .gradio-container {
67
  background: rgba(0, 0, 0, 0.5);
68
  border-radius: 20px;
69
  padding: 30px;
70
  width: 100%;
71
+ max-width: 800px;
72
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
73
+ overflow-y: auto;
74
  animation: fadeIn 1s ease-out;
75
  }
76
 
 
84
  }
85
  }
86
 
87
+ /* Header styling */
88
  .gradio-header {
89
  font-size: 2.5rem;
90
  font-weight: bold;
91
  color: #FFEB3B;
92
  }
93
 
94
+ /* Description styling */
95
  .gradio-description {
96
  font-size: 1.2rem;
97
  color: #ffffff;
 
102
  margin-right: auto;
103
  }
104
 
105
+ /* Button styling with hover effect */
106
  .gr-button {
107
  background: linear-gradient(90deg, #4CAF50, #FFC107);
108
  color: white;
 
114
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
115
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
116
  margin-top: 20px;
117
+ width: 200px; /* Fixed width for consistency */
118
  }
119
 
120
  .gr-button:hover {
 
173
  width: 100%;
174
  }
175
  }
176
+
177
+ /* Desktop and larger screen adjustments */
178
+ @media screen and (min-width: 1024px) {
179
+ .gr-button {
180
+ width: 250px;
181
+ }
182
+ }
183
  """
184
  )
185