Sirivennela commited on
Commit
457157a
·
verified ·
1 Parent(s): 9615eb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -6
app.py CHANGED
@@ -112,15 +112,45 @@ def format_report(scan_type, findings):
112
 
113
  # ------------------ Other Scans -------------------
114
  elif scan_type == "bone":
115
- return "🦴 **Bone X-ray Report**\n\n- Possible fracture or degenerative changes.\n- Recommendation: Orthopedic consultation."
 
 
 
 
 
 
116
  elif scan_type == "brain":
117
- return "🧠 **Brain MRI/CT Report**\n\n- Possible tumor, lesion, or stroke signs.\n- Recommendation: Neurology referral."
 
 
 
 
 
 
118
  elif scan_type == "abdomen":
119
- return "🩺 **Abdomen Scan Report**\n\n- Possible mass or opacity detected.\n- Recommendation: Gastroenterology referral."
 
 
 
 
 
 
120
  elif scan_type == "dental":
121
- return "😁 **Dental X-ray Report**\n\n- Possible cavities or gum disease.\n- Recommendation: Dentist referral."
 
 
 
 
 
 
122
  elif scan_type == "cardiac":
123
- return "❤️ **Cardiac Scan Report**\n\n- Possible cardiomegaly or valve abnormality.\n- Recommendation: Cardiology referral."
 
 
 
 
 
 
124
  else:
125
  return "⚠️ Unknown scan type. Please upload a valid medical scan."
126
 
@@ -142,4 +172,4 @@ demo = gr.Interface(
142
  )
143
 
144
  if __name__ == "__main__":
145
- demo.launch()
 
112
 
113
  # ------------------ Other Scans -------------------
114
  elif scan_type == "bone":
115
+ return """🦴 **Bone X-ray Report**
116
+
117
+ - Possible fracture or degenerative changes.
118
+ - Signs of joint space narrowing suggesting arthritis.
119
+ - Mild osteopenia changes noted.
120
+ - Recommendation: Orthopedic consultation and further imaging if required.
121
+ """
122
  elif scan_type == "brain":
123
+ return """🧠 **Brain MRI/CT Report**
124
+
125
+ - Possible lesion or abnormal density detected.
126
+ - Early ischemic changes cannot be ruled out.
127
+ - Signs suggestive of mass effect or edema.
128
+ - Recommendation: Neurology referral and MRI correlation.
129
+ """
130
  elif scan_type == "abdomen":
131
+ return """🩺 **Abdomen Scan Report**
132
+
133
+ - Abnormal soft tissue shadow or opacity.
134
+ - Possible hepatomegaly or splenomegaly noted.
135
+ - Signs of fluid collection (ascites) suspected.
136
+ - Recommendation: Gastroenterology referral.
137
+ """
138
  elif scan_type == "dental":
139
+ return """😁 **Dental X-ray Report**
140
+
141
+ - Possible dental cavities identified.
142
+ - Signs of gum disease or bone loss.
143
+ - Malalignment or impacted tooth noted.
144
+ - Recommendation: Dentist referral.
145
+ """
146
  elif scan_type == "cardiac":
147
+ return """❤️ **Cardiac Scan Report**
148
+
149
+ - Possible cardiomegaly (enlarged heart).
150
+ - Suspicious valve abnormality detected.
151
+ - Pulmonary congestion signs may be present.
152
+ - Recommendation: Cardiology referral.
153
+ """
154
  else:
155
  return "⚠️ Unknown scan type. Please upload a valid medical scan."
156
 
 
172
  )
173
 
174
  if __name__ == "__main__":
175
+ demo.launch()