Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def load_image(img_path, img_size, show=False):
|
|
44 |
|
45 |
|
46 |
img_size = (300, 300)
|
47 |
-
img_path = "inference image from medscape.jpg"
|
48 |
|
49 |
classes = ["Negative", "Positive"]#["Normal", "Tuberculosis"]
|
50 |
if __name__ == "__main__":
|
@@ -52,7 +52,7 @@ if __name__ == "__main__":
|
|
52 |
footer()
|
53 |
if run == True:
|
54 |
if file is not None:
|
55 |
-
img = load_image(
|
56 |
pred = model.predict(img)
|
57 |
output = classes[round(pred[0][0])]
|
58 |
st.subheader(f"The image is {output}")
|
|
|
44 |
|
45 |
|
46 |
img_size = (300, 300)
|
47 |
+
#img_path = "inference image from medscape.jpg"
|
48 |
|
49 |
classes = ["Negative", "Positive"]#["Normal", "Tuberculosis"]
|
50 |
if __name__ == "__main__":
|
|
|
52 |
footer()
|
53 |
if run == True:
|
54 |
if file is not None:
|
55 |
+
img = load_image(file, img_size)
|
56 |
pred = model.predict(img)
|
57 |
output = classes[round(pred[0][0])]
|
58 |
st.subheader(f"The image is {output}")
|