Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
9ccbc67
1
Parent(s):
93e4d31
Update app.py
Browse files
app.py
CHANGED
@@ -84,14 +84,7 @@ def billing_interface(patient_id):
|
|
84 |
|
85 |
# Gradio Interface
|
86 |
with gr.Blocks() as app:
|
87 |
-
gr.Markdown("""
|
88 |
-
<div style="display: flex; align-items: center; justify-content: center;">
|
89 |
-
<img src="file/logo.png" alt="Logo" style="height: 50px; margin-right: 15px;">
|
90 |
-
<h1 style="color: #ff9800; font-size: 2.5em; font-weight: bold; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);">
|
91 |
-
Sathkrutha LIMS
|
92 |
-
</h1>
|
93 |
-
</div>
|
94 |
-
""", elem_id="header")
|
95 |
|
96 |
with gr.Tab("Patient Registration"):
|
97 |
with gr.Row():
|
@@ -127,176 +120,77 @@ with gr.Blocks() as app:
|
|
127 |
billing_output = gr.Textbox(label="Billing Information")
|
128 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
129 |
|
|
|
130 |
app.css = """
|
131 |
-
/* Global styling */
|
132 |
body {
|
133 |
-
font-family:
|
134 |
-
background:
|
135 |
-
|
|
|
136 |
}
|
137 |
-
|
138 |
-
|
139 |
-
#header h1 {
|
140 |
-
color: #ffcc00;
|
141 |
-
font-size: 2.8em;
|
142 |
-
font-weight: bold;
|
143 |
-
text-align: center;
|
144 |
-
text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
|
145 |
-
padding-bottom: 20px;
|
146 |
-
margin: 0;
|
147 |
}
|
148 |
-
|
149 |
-
/* Container Styling */
|
150 |
.gradio-container {
|
151 |
-
max-width:
|
152 |
-
margin:
|
153 |
-
padding:
|
154 |
-
background:
|
155 |
-
border-radius:
|
156 |
-
box-shadow: 0px
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
}
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
border-radius:
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
}
|
186 |
-
|
187 |
-
/* Input Field Styling (outer container) */
|
188 |
-
#name_field, #father_name_field, #age_field, #phone_field, #pincode_field, textarea {
|
189 |
-
width: 100%;
|
190 |
-
background-color: #383838; /* Dark background for outer container */
|
191 |
-
color: #f0f0f0;
|
192 |
-
border: 1px solid #666;
|
193 |
-
border-radius: 8px;
|
194 |
-
padding: 0;
|
195 |
-
font-size: 1em;
|
196 |
-
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
197 |
-
margin-top: 10px;
|
198 |
-
box-sizing: border-box;
|
199 |
-
}
|
200 |
-
|
201 |
-
/* Inner input area styling */
|
202 |
-
#name_field input, #father_name_field input, #age_field input, #phone_field input, #pincode_field input, textarea {
|
203 |
-
background-color: #ffffff; /* White background for inner input area */
|
204 |
-
color: #000; /* Black text color for readability */
|
205 |
-
border: none;
|
206 |
-
padding: 12px;
|
207 |
-
border-radius: 8px;
|
208 |
-
font-size: 1em;
|
209 |
-
}
|
210 |
-
|
211 |
-
/* Focus effect for the outer field container */
|
212 |
-
#name_field:focus-within, #father_name_field:focus-within, #age_field:focus-within, #phone_field:focus-within, #pincode_field:focus-within, textarea:focus-within {
|
213 |
-
border-color: #ffcc00;
|
214 |
-
box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
|
215 |
-
outline: none;
|
216 |
}
|
217 |
-
|
218 |
-
/* Button Styling */
|
219 |
.gr-button {
|
220 |
-
|
221 |
-
color: #ffffff;
|
222 |
border: none;
|
223 |
-
border-radius:
|
224 |
-
padding:
|
225 |
cursor: pointer;
|
226 |
-
font-size: 1em;
|
227 |
font-weight: bold;
|
228 |
-
transition: background-color 0.3s ease, transform 0.2s ease;
|
229 |
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
230 |
-
margin-top: 15px;
|
231 |
}
|
232 |
-
|
233 |
.gr-button:hover {
|
234 |
-
background-color: #
|
235 |
-
transform: translateY(-2px);
|
236 |
-
}
|
237 |
-
|
238 |
-
.gr-button:active {
|
239 |
-
background-color: #cc9900;
|
240 |
-
transform: translateY(0px);
|
241 |
-
}
|
242 |
-
|
243 |
-
/* Advanced styling for Test Categories and Available Tests checkboxes */
|
244 |
-
.gr-checkbox-group label {
|
245 |
-
display: inline-flex;
|
246 |
-
align-items: center;
|
247 |
-
padding: 8px 12px;
|
248 |
-
margin: 5px;
|
249 |
-
font-size: 0.9em;
|
250 |
-
font-weight: bold;
|
251 |
-
color: #f0f0f0;
|
252 |
-
background-color: #454545;
|
253 |
-
border: 1px solid #666;
|
254 |
-
border-radius: 6px;
|
255 |
-
cursor: pointer;
|
256 |
-
transition: all 0.3s ease;
|
257 |
-
}
|
258 |
-
|
259 |
-
.gr-checkbox-group label:hover {
|
260 |
-
background-color: #555;
|
261 |
-
border-color: #ffcc00;
|
262 |
-
color: #ffcc00;
|
263 |
}
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
border-color: #ffcc00;
|
268 |
-
color: #ffffff;
|
269 |
}
|
270 |
-
|
271 |
-
|
272 |
-
display: none;
|
273 |
}
|
274 |
-
|
275 |
-
/* Billing Output Styling */
|
276 |
#billing_output {
|
277 |
-
background-color: #
|
278 |
padding: 15px;
|
279 |
-
border-radius:
|
280 |
-
color: #
|
281 |
-
border: 1px solid #ffcc00;
|
282 |
-
font-size: 1em;
|
283 |
-
margin-top: 10px;
|
284 |
}
|
285 |
-
|
286 |
-
/* Responsive Design */
|
287 |
-
@media (max-width: 768px) {
|
288 |
-
#header h1 {
|
289 |
-
font-size: 2.2em;
|
290 |
-
}
|
291 |
-
.gradio-container {
|
292 |
-
padding: 20px;
|
293 |
-
}
|
294 |
-
.gr-button {
|
295 |
-
padding: 10px 20px;
|
296 |
-
font-size: 0.9em;
|
297 |
-
}
|
298 |
-
}
|
299 |
-
|
300 |
"""
|
301 |
|
302 |
app.launch()
|
|
|
84 |
|
85 |
# Gradio Interface
|
86 |
with gr.Blocks() as app:
|
87 |
+
gr.Markdown("<h1 style='text-align: center;'>Sathkrutha LIMS</h1>", elem_id="header")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
with gr.Tab("Patient Registration"):
|
90 |
with gr.Row():
|
|
|
120 |
billing_output = gr.Textbox(label="Billing Information")
|
121 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
122 |
|
123 |
+
# Custom CSS styling
|
124 |
app.css = """
|
|
|
125 |
body {
|
126 |
+
font-family: Arial, sans-serif;
|
127 |
+
background: url('./background.png') no-repeat center center fixed;
|
128 |
+
background-size: cover;
|
129 |
+
color: #ccdb42;
|
130 |
}
|
131 |
+
#header {
|
132 |
+
color: #ccdb42;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
|
|
|
|
134 |
.gradio-container {
|
135 |
+
max-width: 800px;
|
136 |
+
margin: 0 auto;
|
137 |
+
padding: 20px;
|
138 |
+
background: rgba(34, 34, 34, 0.9); /* Slight transparency */
|
139 |
+
border-radius: 10px;
|
140 |
+
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
|
141 |
+
}
|
142 |
+
#name_field, #father_name_field {
|
143 |
+
max-width: 750px;
|
144 |
+
border: 1px solid #ddd;
|
145 |
+
border-radius: 5px;
|
146 |
+
padding: 10px;
|
147 |
+
}
|
148 |
+
#age_field {
|
149 |
+
max-width: 300px;
|
150 |
+
border: 1px solid #ddd;
|
151 |
+
border-radius: 5px;
|
152 |
+
padding: 10px;
|
153 |
+
}
|
154 |
+
#phone_field {
|
155 |
+
max-width: 1100px;
|
156 |
+
border: 1px solid #ddd;
|
157 |
+
border-radius: 5px;
|
158 |
+
padding: 10px;
|
159 |
+
}
|
160 |
+
#pincode_field {
|
161 |
+
max-width: 400px;
|
162 |
+
border: 1px solid #ddd;
|
163 |
+
border-radius: 5px;
|
164 |
+
padding: 10px;
|
165 |
+
}
|
166 |
+
textarea {
|
167 |
+
font-size: 14px;
|
168 |
+
color: #edebeb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
|
|
|
|
170 |
.gr-button {
|
171 |
+
color: #14d10a;
|
|
|
172 |
border: none;
|
173 |
+
border-radius: 5px;
|
174 |
+
padding: 10px 20px;
|
175 |
cursor: pointer;
|
|
|
176 |
font-weight: bold;
|
|
|
|
|
|
|
177 |
}
|
|
|
178 |
.gr-button:hover {
|
179 |
+
background-color: #2d32b5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
+
.gr-tab {
|
182 |
+
background-color: transparent; /* Fully transparent */
|
183 |
+
border-radius: 8px;
|
|
|
|
|
184 |
}
|
185 |
+
h1, h2, h3, h4, h5, h6 {
|
186 |
+
color: #de14de;
|
|
|
187 |
}
|
|
|
|
|
188 |
#billing_output {
|
189 |
+
background-color: #b0c91e;
|
190 |
padding: 15px;
|
191 |
+
border-radius: 5px;
|
192 |
+
color: #272dd9;
|
|
|
|
|
|
|
193 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
"""
|
195 |
|
196 |
app.launch()
|