Update app.py
Browse files
app.py
CHANGED
@@ -40,6 +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 |
body {
|
44 |
font-family: 'Arial', sans-serif;
|
45 |
background: linear-gradient(135deg, #FF6F61, #FF9F9F, #FFEB3B);
|
@@ -61,19 +62,19 @@ interface = gr.Interface(
|
|
61 |
100% { background-position: 0% 50%; }
|
62 |
}
|
63 |
|
64 |
-
/*
|
65 |
.gradio-container {
|
66 |
background: rgba(0, 0, 0, 0.5);
|
67 |
border-radius: 20px;
|
68 |
-
padding:
|
69 |
-
width:
|
70 |
-
max-width:
|
71 |
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
|
72 |
overflow-y: auto; /* Make content inside the container scrollable */
|
73 |
animation: fadeIn 1s ease-out;
|
74 |
}
|
75 |
|
76 |
-
/* Fade in effect
|
77 |
@keyframes fadeIn {
|
78 |
from {
|
79 |
opacity: 0;
|
@@ -83,6 +84,7 @@ interface = gr.Interface(
|
|
83 |
}
|
84 |
}
|
85 |
|
|
|
86 |
.gradio-header {
|
87 |
font-size: 2.5rem;
|
88 |
font-weight: bold;
|
@@ -94,8 +96,12 @@ interface = gr.Interface(
|
|
94 |
color: #ffffff;
|
95 |
margin-top: 10px;
|
96 |
font-style: italic;
|
|
|
|
|
|
|
97 |
}
|
98 |
|
|
|
99 |
.gr-button {
|
100 |
background: linear-gradient(90deg, #4CAF50, #FFC107);
|
101 |
color: white;
|
@@ -106,6 +112,7 @@ interface = gr.Interface(
|
|
106 |
cursor: pointer;
|
107 |
transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
|
108 |
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
|
|
109 |
}
|
110 |
|
111 |
.gr-button:hover {
|
@@ -120,12 +127,14 @@ interface = gr.Interface(
|
|
120 |
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
|
121 |
}
|
122 |
|
|
|
123 |
.gr-image-container {
|
124 |
margin-top: 20px;
|
125 |
border-radius: 15px;
|
126 |
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
|
127 |
}
|
128 |
|
|
|
129 |
.gr-textbox {
|
130 |
background-color: #333;
|
131 |
color: #FFEB3B;
|
@@ -142,10 +151,26 @@ interface = gr.Interface(
|
|
142 |
border: 2px solid #FF6F61;
|
143 |
}
|
144 |
|
145 |
-
/*
|
146 |
.gradio-button {
|
147 |
text-transform: uppercase;
|
148 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
"""
|
150 |
)
|
151 |
|
|
|
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);
|
|
|
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 |
|
77 |
+
/* Fade in effect */
|
78 |
@keyframes fadeIn {
|
79 |
from {
|
80 |
opacity: 0;
|
|
|
84 |
}
|
85 |
}
|
86 |
|
87 |
+
/* Header styles */
|
88 |
.gradio-header {
|
89 |
font-size: 2.5rem;
|
90 |
font-weight: bold;
|
|
|
96 |
color: #ffffff;
|
97 |
margin-top: 10px;
|
98 |
font-style: italic;
|
99 |
+
max-width: 700px;
|
100 |
+
margin-left: auto;
|
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;
|
|
|
112 |
cursor: pointer;
|
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 {
|
|
|
127 |
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
|
128 |
}
|
129 |
|
130 |
+
/* Image container styling */
|
131 |
.gr-image-container {
|
132 |
margin-top: 20px;
|
133 |
border-radius: 15px;
|
134 |
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
|
135 |
}
|
136 |
|
137 |
+
/* Textbox styling */
|
138 |
.gr-textbox {
|
139 |
background-color: #333;
|
140 |
color: #FFEB3B;
|
|
|
151 |
border: 2px solid #FF6F61;
|
152 |
}
|
153 |
|
154 |
+
/* Button text formatting */
|
155 |
.gradio-button {
|
156 |
text-transform: uppercase;
|
157 |
}
|
158 |
+
|
159 |
+
/* Mobile responsiveness */
|
160 |
+
@media screen and (max-width: 768px) {
|
161 |
+
.gradio-container {
|
162 |
+
padding: 15px;
|
163 |
+
width: 90%;
|
164 |
+
}
|
165 |
+
|
166 |
+
.gradio-header {
|
167 |
+
font-size: 2rem;
|
168 |
+
}
|
169 |
+
|
170 |
+
.gr-button {
|
171 |
+
width: 100%;
|
172 |
+
}
|
173 |
+
}
|
174 |
"""
|
175 |
)
|
176 |
|