Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
cd00d82
1
Parent(s):
a3d167e
Update app.py
Browse files
app.py
CHANGED
@@ -122,85 +122,125 @@ with gr.Blocks() as app:
|
|
122 |
billing_output = gr.Textbox(label="Billing Information")
|
123 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
124 |
|
125 |
-
# Custom CSS styling
|
126 |
app.css = """
|
|
|
127 |
body {
|
128 |
-
font-family: Arial, sans-serif;
|
129 |
background: url('./background.png') no-repeat center center fixed;
|
130 |
background-size: cover;
|
131 |
-
color: #
|
132 |
}
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
#name_field, #father_name_field {
|
144 |
-
max-width: 750px;
|
145 |
-
border: 1px solid #ddd;
|
146 |
-
border-radius: 5px;
|
147 |
-
padding: 10px;
|
148 |
}
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
padding:
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
162 |
}
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
-
textarea {
|
172 |
-
|
173 |
-
|
|
|
174 |
}
|
175 |
|
|
|
176 |
.gr-button {
|
177 |
-
color: #
|
|
|
178 |
border: none;
|
179 |
-
border-radius:
|
180 |
-
padding:
|
181 |
cursor: pointer;
|
|
|
182 |
font-weight: bold;
|
|
|
|
|
|
|
183 |
}
|
184 |
|
185 |
.gr-button:hover {
|
186 |
-
background-color: #
|
|
|
187 |
}
|
188 |
|
189 |
-
.gr-
|
190 |
-
background-color:
|
191 |
-
|
192 |
}
|
193 |
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
198 |
#billing_output {
|
199 |
-
background-color:
|
200 |
padding: 15px;
|
201 |
-
border-radius:
|
202 |
color: #272dd9;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
"""
|
205 |
|
|
|
206 |
app.launch()
|
|
|
122 |
billing_output = gr.Textbox(label="Billing Information")
|
123 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
124 |
|
125 |
+
# Custom Advanced CSS styling
|
126 |
app.css = """
|
127 |
+
/* Global styling */
|
128 |
body {
|
129 |
+
font-family: 'Arial', sans-serif;
|
130 |
background: url('./background.png') no-repeat center center fixed;
|
131 |
background-size: cover;
|
132 |
+
color: #f0f0f0;
|
133 |
}
|
134 |
|
135 |
+
/* Header Styling */
|
136 |
+
#header h1 {
|
137 |
+
color: #ff9800;
|
138 |
+
font-size: 2.5em;
|
139 |
+
font-weight: bold;
|
140 |
+
text-align: center;
|
141 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
142 |
+
padding-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
|
145 |
+
/* Container Styling */
|
146 |
+
.gradio-container {
|
147 |
+
max-width: 850px;
|
148 |
+
margin: 20px auto;
|
149 |
+
padding: 30px;
|
150 |
+
background: rgba(34, 34, 34, 0.85);
|
151 |
+
border-radius: 12px;
|
152 |
+
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
|
153 |
+
color: #f0f0f0;
|
154 |
}
|
155 |
|
156 |
+
/* Tab Styling */
|
157 |
+
.gr-tab {
|
158 |
+
background-color: transparent;
|
159 |
+
color: #f0f0f0;
|
160 |
+
border-bottom: 2px solid #ff9800;
|
161 |
+
padding-top: 10px;
|
162 |
}
|
163 |
|
164 |
+
/* Input Field Styling */
|
165 |
+
#name_field, #father_name_field, #age_field, #phone_field, #pincode_field, textarea {
|
166 |
+
width: 100%;
|
167 |
+
background-color: #2e2e2e;
|
168 |
+
color: #f0f0f0;
|
169 |
+
border: 1px solid #555;
|
170 |
+
border-radius: 8px;
|
171 |
+
padding: 12px;
|
172 |
+
font-size: 1em;
|
173 |
+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
174 |
+
margin-top: 10px;
|
175 |
}
|
176 |
|
177 |
+
#name_field:focus, #father_name_field:focus, #age_field:focus, #phone_field:focus, #pincode_field:focus, textarea:focus {
|
178 |
+
border-color: #ff9800;
|
179 |
+
box-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
|
180 |
+
outline: none;
|
181 |
}
|
182 |
|
183 |
+
/* Button Styling */
|
184 |
.gr-button {
|
185 |
+
background-color: #ff9800;
|
186 |
+
color: #ffffff;
|
187 |
border: none;
|
188 |
+
border-radius: 8px;
|
189 |
+
padding: 12px 25px;
|
190 |
cursor: pointer;
|
191 |
+
font-size: 1em;
|
192 |
font-weight: bold;
|
193 |
+
transition: background-color 0.3s ease, transform 0.2s ease;
|
194 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
|
195 |
+
margin-top: 15px;
|
196 |
}
|
197 |
|
198 |
.gr-button:hover {
|
199 |
+
background-color: #e68a00;
|
200 |
+
transform: translateY(-2px);
|
201 |
}
|
202 |
|
203 |
+
.gr-button:active {
|
204 |
+
background-color: #d97600;
|
205 |
+
transform: translateY(0px);
|
206 |
}
|
207 |
|
208 |
+
/* Checkbox Group Styling */
|
209 |
+
.gr-checkbox-group label {
|
210 |
+
color: #f0f0f0;
|
211 |
+
font-size: 1em;
|
212 |
+
margin-top: 5px;
|
213 |
}
|
214 |
|
215 |
+
.gr-checkbox-group input[type="checkbox"] {
|
216 |
+
accent-color: #ff9800;
|
217 |
+
}
|
218 |
+
|
219 |
+
/* Billing Output Styling */
|
220 |
#billing_output {
|
221 |
+
background-color: rgba(176, 201, 30, 0.1);
|
222 |
padding: 15px;
|
223 |
+
border-radius: 8px;
|
224 |
color: #272dd9;
|
225 |
+
border: 1px solid #b0c91e;
|
226 |
+
font-size: 1em;
|
227 |
+
margin-top: 10px;
|
228 |
+
}
|
229 |
+
|
230 |
+
/* Responsive Design */
|
231 |
+
@media (max-width: 768px) {
|
232 |
+
#header h1 {
|
233 |
+
font-size: 2em;
|
234 |
+
}
|
235 |
+
.gradio-container {
|
236 |
+
padding: 20px;
|
237 |
+
}
|
238 |
+
.gr-button {
|
239 |
+
padding: 10px 20px;
|
240 |
+
font-size: 0.9em;
|
241 |
+
}
|
242 |
}
|
243 |
"""
|
244 |
|
245 |
+
|
246 |
app.launch()
|