Jyothirmai
commited on
Commit
•
174fd3c
1
Parent(s):
8c02740
Update app.py
Browse files
app.py
CHANGED
@@ -49,19 +49,19 @@ caption = gr.Textbox(label="Generated Caption")
|
|
49 |
real_caption = gr.Textbox(label="Actual Caption")
|
50 |
|
51 |
def getCaption(imgID):
|
52 |
-
real_captions = {"1" : "No acute cardiopulmonary abnormality.
|
53 |
-
"2":"
|
54 |
-
"3":"
|
55 |
-
"4":"
|
56 |
|
57 |
print(real_captions[imgID])
|
58 |
return real_captions[imgID]
|
59 |
|
60 |
def getImageID(imgID):
|
61 |
-
imgIDs = {"1":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
62 |
-
"2":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
63 |
-
"3":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
64 |
-
"4":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/
|
65 |
print(imgIDs[imgID])
|
66 |
return imgIDs[imgID]
|
67 |
|
|
|
49 |
real_caption = gr.Textbox(label="Actual Caption")
|
50 |
|
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. 2. 9 mm left lower lobe pulmonary nodule not definitively calcified. Recommend comparison with prior images to document stability. If none are available consider nonemergent XXXX chest for further characterization. . Normal heart size and mediastinal contours. The lungs are free of any focal airspace disease. In the left lung base, there is a 9 mm nodule that not definitively calcified. No pneumothorax or pleural effusion. No acute bony abnormalities.",
|
55 |
+
"4":"No acute disease. Left lung nodule. Correlate with prior films if available. If none are available, followup imaging in 6 months is suggested. The heart is normal in size. The mediastinum is unremarkable. Small nodule seen in the left upper lung, possibly granuloma. The lungs are otherwise clear."}
|
56 |
|
57 |
print(real_captions[imgID])
|
58 |
return real_captions[imgID]
|
59 |
|
60 |
def getImageID(imgID):
|
61 |
+
imgIDs = {"1":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR412_IM-2056_0",
|
62 |
+
"2":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR545_IM-2149_0",
|
63 |
+
"3":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR849_IM-2371_0",
|
64 |
+
"4":"/content/drive/MyDrive/cnn-rnn/NLMCXR_png/CXR2163_IM-0779_0"}
|
65 |
print(imgIDs[imgID])
|
66 |
return imgIDs[imgID]
|
67 |
|