Spaces:
Runtime error
Runtime error
scontess
commited on
Commit
Β·
d592c7c
1
Parent(s):
ec2d61e
pippo
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
@@ -68,7 +68,7 @@ image = sample["image"]
|
|
68 |
label = sample["label"]
|
69 |
|
70 |
# π Mostra l'immagine e la classe in Streamlit
|
71 |
-
st.image(image, caption=f"Classe: {label}",
|
72 |
st.write(f"π Esempio dal dataset: {sample}")
|
73 |
|
74 |
#Carica il dataset esterno da imagenet PER TENSORFLOW
|
@@ -84,7 +84,7 @@ for i, sample in enumerate(dataset):
|
|
84 |
|
85 |
image = tf.image.resize(image, (224, 224)) / 255.0 # Normalizzazione
|
86 |
image_list.append(image.numpy())
|
87 |
-
label_list.append(
|
88 |
|
89 |
X_train = np.array(image_list)
|
90 |
y_train = np.array(label_list)
|
|
|
68 |
label = sample["label"]
|
69 |
|
70 |
# π Mostra l'immagine e la classe in Streamlit
|
71 |
+
st.image(image, caption=f"Classe: {label}", use_container_width=True)
|
72 |
st.write(f"π Esempio dal dataset: {sample}")
|
73 |
|
74 |
#Carica il dataset esterno da imagenet PER TENSORFLOW
|
|
|
84 |
|
85 |
image = tf.image.resize(image, (224, 224)) / 255.0 # Normalizzazione
|
86 |
image_list.append(image.numpy())
|
87 |
+
label_list.append(np.array(sample["label"]))
|
88 |
|
89 |
X_train = np.array(image_list)
|
90 |
y_train = np.array(label_list)
|