Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
85bc4be
1
Parent(s):
0eea6b3
Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,12 @@ with gr.Blocks() as app:
|
|
51 |
name = gr.Textbox(label="Patient Name", placeholder="Enter patient name", elem_id="name_field", lines=1)
|
52 |
father_name = gr.Textbox(label="Father/Husband Name", placeholder="Enter father or husband name", elem_id="father_name_field", lines=1)
|
53 |
with gr.Row():
|
54 |
-
age = gr.Number(label="Age", value=None, minimum=0, maximum=99, elem_id="age_field")
|
55 |
-
phone = gr.Number(label="Phone Number", value=None, elem_id="phone_field")
|
56 |
with gr.Row():
|
57 |
address = gr.Textbox(label="Address", placeholder="Enter address", lines=2)
|
58 |
-
pincode = gr.Number(label="Pincode", value=None, elem_id="pincode_field")
|
59 |
-
register_button = gr.Button("Register Patient")
|
60 |
registration_output = gr.Textbox(label="Registration Output")
|
61 |
|
62 |
register_button.click(registration_interface, [name, father_name, age, phone, address, pincode], registration_output)
|
@@ -80,22 +80,35 @@ with gr.Blocks() as app:
|
|
80 |
billing_output = gr.Textbox(label="Billing Information")
|
81 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
82 |
|
83 |
-
# Custom CSS to adjust field sizes
|
84 |
app.css = """
|
85 |
#name_field, #father_name_field {
|
86 |
-
max-width:
|
87 |
}
|
88 |
|
89 |
#age_field {
|
90 |
-
max-width:
|
91 |
}
|
92 |
|
93 |
#phone_field {
|
94 |
-
max-width:
|
95 |
}
|
96 |
|
97 |
#pincode_field {
|
98 |
-
max-width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
"""
|
101 |
|
|
|
51 |
name = gr.Textbox(label="Patient Name", placeholder="Enter patient name", elem_id="name_field", lines=1)
|
52 |
father_name = gr.Textbox(label="Father/Husband Name", placeholder="Enter father or husband name", elem_id="father_name_field", lines=1)
|
53 |
with gr.Row():
|
54 |
+
age = gr.Number(label="Age", value=None, minimum=0, maximum=99, elem_id="age_field", precision=0)
|
55 |
+
phone = gr.Number(label="Phone Number", value=None, elem_id="phone_field", precision=0)
|
56 |
with gr.Row():
|
57 |
address = gr.Textbox(label="Address", placeholder="Enter address", lines=2)
|
58 |
+
pincode = gr.Number(label="Pincode", value=None, elem_id="pincode_field", precision=0)
|
59 |
+
register_button = gr.Button("Register Patient", elem_id="register_button")
|
60 |
registration_output = gr.Textbox(label="Registration Output")
|
61 |
|
62 |
register_button.click(registration_interface, [name, father_name, age, phone, address, pincode], registration_output)
|
|
|
80 |
billing_output = gr.Textbox(label="Billing Information")
|
81 |
fetch_button.click(billing_interface, [patient_id_bill], billing_output)
|
82 |
|
83 |
+
# Custom CSS to adjust field sizes and button color
|
84 |
app.css = """
|
85 |
#name_field, #father_name_field {
|
86 |
+
max-width: 200px;
|
87 |
}
|
88 |
|
89 |
#age_field {
|
90 |
+
max-width: 80px;
|
91 |
}
|
92 |
|
93 |
#phone_field {
|
94 |
+
max-width: 150px;
|
95 |
}
|
96 |
|
97 |
#pincode_field {
|
98 |
+
max-width: 100px;
|
99 |
+
}
|
100 |
+
|
101 |
+
#register_button button {
|
102 |
+
background-color: green;
|
103 |
+
color: white;
|
104 |
+
border: none;
|
105 |
+
padding: 10px 20px;
|
106 |
+
font-size: 16px;
|
107 |
+
cursor: pointer;
|
108 |
+
}
|
109 |
+
|
110 |
+
#register_button button:hover {
|
111 |
+
background-color: darkgreen;
|
112 |
}
|
113 |
"""
|
114 |
|