ashishkgpian commited on
Commit
a455fe1
·
verified ·
1 Parent(s): 2ca7730

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -12
app.py CHANGED
@@ -45,6 +45,7 @@ def classify_symptoms(text):
45
  return f"Error processing classification: {str(e)}"
46
 
47
  # Enhanced CSS with white background and black text
 
48
  custom_css = """
49
  .gradio-container {
50
  width: 100% !important;
@@ -86,14 +87,19 @@ h3 {
86
  font-weight: 500 !important;
87
  margin-bottom: 2rem !important;
88
  }
 
 
 
 
 
89
  .input-container {
90
  background: #121212 !important;
91
  padding: 2rem !important;
92
  border-radius: 12px !important;
93
  box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
94
- margin: 2rem 0 !important;
95
- width: 100% !important;
96
  border: 1px solid #333333 !important;
 
97
  }
98
  .input-container label {
99
  color: #ffffff !important;
@@ -132,10 +138,10 @@ textarea {
132
  padding: 2rem !important;
133
  border-radius: 12px !important;
134
  box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
135
- margin: 2rem 0 !important;
136
- width: 100% !important;
137
  border: 1px solid #333333 !important;
138
  color: #ffffff !important;
 
139
  }
140
  .output-container label {
141
  color: #ffffff !important;
@@ -171,18 +177,17 @@ textarea {
171
  }
172
  """
173
 
174
-
175
  with gr.Blocks(css=custom_css) as demo:
176
  with gr.Row(elem_classes=["main-container"]):
177
  with gr.Column(elem_classes=["content-wrapper"]):
178
  gr.Markdown(
179
  """
180
- # ⚕️ Clinical Symptom ICD-9 Classifier
181
  ### AI-Powered Medical Diagnosis Code Suggestion Tool
182
  """
183
  )
184
 
185
- with gr.Row():
186
  with gr.Column(elem_classes=["input-container"]):
187
  input_text = gr.Textbox(
188
  label="Clinical Symptom Description",
@@ -190,11 +195,11 @@ with gr.Blocks(css=custom_css) as demo:
190
  lines=5
191
  )
192
  submit_btn = gr.Button("Analyze Symptoms", elem_classes=["submit-btn"])
193
-
194
- with gr.Row(elem_classes=["output-container"]):
195
- output = gr.JSON(
196
- label="Suggested ICD9 Diagnostic Codes with Descriptions"
197
- )
198
 
199
  with gr.Row(elem_classes=["examples-container"]):
200
  examples = gr.Examples(
 
45
  return f"Error processing classification: {str(e)}"
46
 
47
  # Enhanced CSS with white background and black text
48
+
49
  custom_css = """
50
  .gradio-container {
51
  width: 100% !important;
 
87
  font-weight: 500 !important;
88
  margin-bottom: 2rem !important;
89
  }
90
+ .input-output-row {
91
+ display: flex !important;
92
+ gap: 2rem !important;
93
+ margin: 2rem 0 !important;
94
+ }
95
  .input-container {
96
  background: #121212 !important;
97
  padding: 2rem !important;
98
  border-radius: 12px !important;
99
  box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
100
+ width: 50% !important;
 
101
  border: 1px solid #333333 !important;
102
+ flex: 1 !important;
103
  }
104
  .input-container label {
105
  color: #ffffff !important;
 
138
  padding: 2rem !important;
139
  border-radius: 12px !important;
140
  box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
141
+ width: 50% !important;
 
142
  border: 1px solid #333333 !important;
143
  color: #ffffff !important;
144
+ flex: 1 !important;
145
  }
146
  .output-container label {
147
  color: #ffffff !important;
 
177
  }
178
  """
179
 
 
180
  with gr.Blocks(css=custom_css) as demo:
181
  with gr.Row(elem_classes=["main-container"]):
182
  with gr.Column(elem_classes=["content-wrapper"]):
183
  gr.Markdown(
184
  """
185
+ # 🏥 Clinical Symptom ICD9 Classifier
186
  ### AI-Powered Medical Diagnosis Code Suggestion Tool
187
  """
188
  )
189
 
190
+ with gr.Row(elem_classes=["input-output-row"]):
191
  with gr.Column(elem_classes=["input-container"]):
192
  input_text = gr.Textbox(
193
  label="Clinical Symptom Description",
 
195
  lines=5
196
  )
197
  submit_btn = gr.Button("Analyze Symptoms", elem_classes=["submit-btn"])
198
+
199
+ with gr.Column(elem_classes=["output-container"]):
200
+ output = gr.JSON(
201
+ label="Suggested ICD9 Diagnostic Codes with Descriptions"
202
+ )
203
 
204
  with gr.Row(elem_classes=["examples-container"]):
205
  examples = gr.Examples(