Spaces:
Sleeping
Sleeping
Fix image width
Browse files
app.py
CHANGED
@@ -29,7 +29,8 @@ st.markdown("""Search for medical images with natural language powered by a CLIP
|
|
29 |
st.markdown("""Example queries:
|
30 |
* `ultrasound scans`
|
31 |
* `pathology`
|
32 |
-
* `pancreatic carcinoma`
|
|
|
33 |
|
34 |
image_list, image_embeddings = load_image_embeddings()
|
35 |
model, processor = load_model()
|
@@ -50,6 +51,6 @@ if st.button("Search"):
|
|
50 |
#show images
|
51 |
for img_path, score in zip(matching_images, top_scores):
|
52 |
img = plt.imread(os.path.join(img_dir, img_path))
|
53 |
-
st.image(img)
|
54 |
st.write(f"{img_path} ({score:.2f})", help="score")
|
55 |
|
|
|
29 |
st.markdown("""Example queries:
|
30 |
* `ultrasound scans`
|
31 |
* `pathology`
|
32 |
+
* `pancreatic carcinoma`
|
33 |
+
* `PET scan`""")
|
34 |
|
35 |
image_list, image_embeddings = load_image_embeddings()
|
36 |
model, processor = load_model()
|
|
|
51 |
#show images
|
52 |
for img_path, score in zip(matching_images, top_scores):
|
53 |
img = plt.imread(os.path.join(img_dir, img_path))
|
54 |
+
st.image(img, width=300)
|
55 |
st.write(f"{img_path} ({score:.2f})", help="score")
|
56 |
|