dfdfd
Browse files
app.py
CHANGED
|
@@ -45,7 +45,17 @@ def predict_image(name_image):
|
|
| 45 |
|
| 46 |
# image_hf = "valencar/modelo_raios_x/dados_teste/" + name_image
|
| 47 |
|
| 48 |
-
image_hf = "valencar/modelo_raios_x/dados_teste/" + "CHNCXR_0001_0.png"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
img = img_orig = image.load_img(image_hf, target_size = (IMAGE_HEIGHT, IMAGE_WIDTH))
|
| 51 |
img = image.img_to_array(img)
|
|
|
|
| 45 |
|
| 46 |
# image_hf = "valencar/modelo_raios_x/dados_teste/" + name_image
|
| 47 |
|
| 48 |
+
# image_hf = "valencar/modelo_raios_x/dados_teste/" + "CHNCXR_0001_0.png"
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
from PIL import Image
|
| 52 |
+
import requests
|
| 53 |
+
|
| 54 |
+
url = "https://huggingface.co/valencar/modelo_raios_x/blob/main/dados_teste/CHNCXR_0001_0.png"
|
| 55 |
+
|
| 56 |
+
req = requests.get(url, stream=True).raw
|
| 57 |
+
image_hf = Image.open(req)
|
| 58 |
+
|
| 59 |
|
| 60 |
img = img_orig = image.load_img(image_hf, target_size = (IMAGE_HEIGHT, IMAGE_WIDTH))
|
| 61 |
img = image.img_to_array(img)
|