Jyothirmai
commited on
Commit
•
1c1d514
1
Parent(s):
00cbdfd
Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,8 @@ real_caption = gr.Textbox(label="Actual Caption")
|
|
51 |
def getCaption(imgID):
|
52 |
real_captions = {"1" : "No acute cardiopulmonary abnormality. 2. Stable bilateral emphysematous and lower lobe fibrotic changes. Bilateral emphysematous again noted and lower lobe fibrotic changes. Postsurgical changes of the chest including CABG procedure, stable. Stable valve artifact. There are no focal areas of consolidation. No large pleural effusions. No evidence of pneumothorax. Degenerative changes noted of the visualized thoracic spine. Nodular right lower lobe opacity, XXXX nipple XXXX. Contour abnormality of the posterior aspect of the right 7th rib again noted, stable.",
|
53 |
"2":"Hypoinflation with bibasilar focal atelectasis. Lung volumes are XXXX. XXXX opacities are present in both lung bases. A hiatal hernia is present. Heart and pulmonary XXXX are normal.",
|
54 |
-
"3":"No acute cardiopulmonary process.
|
55 |
-
"4":"
|
56 |
"5": "No Actual Caption",
|
57 |
"6": "No Actual Caption"}
|
58 |
|
@@ -61,8 +61,8 @@ def getCaption(imgID):
|
|
61 |
def getImageID(imgID):
|
62 |
imgIDs = {"1":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR412_IM-2056_0",
|
63 |
"2":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR545_IM-2149_0",
|
64 |
-
"3":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
65 |
-
"4":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
66 |
return imgIDs[imgID]
|
67 |
|
68 |
def predict(img, model_name, max_tokens, temperature, imgID):
|
|
|
51 |
def getCaption(imgID):
|
52 |
real_captions = {"1" : "No acute cardiopulmonary abnormality. 2. Stable bilateral emphysematous and lower lobe fibrotic changes. Bilateral emphysematous again noted and lower lobe fibrotic changes. Postsurgical changes of the chest including CABG procedure, stable. Stable valve artifact. There are no focal areas of consolidation. No large pleural effusions. No evidence of pneumothorax. Degenerative changes noted of the visualized thoracic spine. Nodular right lower lobe opacity, XXXX nipple XXXX. Contour abnormality of the posterior aspect of the right 7th rib again noted, stable.",
|
53 |
"2":"Hypoinflation with bibasilar focal atelectasis. Lung volumes are XXXX. XXXX opacities are present in both lung bases. A hiatal hernia is present. Heart and pulmonary XXXX are normal.",
|
54 |
+
"3":"No evidence of acute cardiopulmonary process. The XXXX examination consists of frontal and lateral radiographs of the chest. External monitor leads XXXX the thorax. The cardiomediastinal contours are within normal limits. Pulmonary vascularity is within normal limits. No focal consolidation, pleural effusion, or pneumothorax identified. The visualized osseous structures and upper abdomen are unremarkable.",
|
55 |
+
"4":"Negative chest . The lungs are clear. The cardiomediastinal silhouette is within normal limits. No pneumothorax or pleural effusion.",
|
56 |
"5": "No Actual Caption",
|
57 |
"6": "No Actual Caption"}
|
58 |
|
|
|
61 |
def getImageID(imgID):
|
62 |
imgIDs = {"1":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR412_IM-2056_0",
|
63 |
"2":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR545_IM-2149_0",
|
64 |
+
"3":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR3044_IM-1418_0",
|
65 |
+
"4":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR3587_IM-1765_0"}
|
66 |
return imgIDs[imgID]
|
67 |
|
68 |
def predict(img, model_name, max_tokens, temperature, imgID):
|