Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,7 @@ import numpy as np
|
|
7 |
|
8 |
img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
|
9 |
if img_file_buffer is not None:
|
10 |
-
image = Image.open(img_file_buffer)
|
11 |
-
image_array=np.array(image)
|
12 |
-
print("Image_array.shape:",image_array.shape)
|
13 |
|
14 |
feature_extractor = ViTFeatureExtractor.from_pretrained('rizvandwiki/gender-classification')
|
15 |
model = ViTForImageClassification.from_pretrained('rizvandwiki/gender-classification')
|
|
|
7 |
|
8 |
img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
|
9 |
if img_file_buffer is not None:
|
10 |
+
image = Image.open(img_file_buffer)
|
|
|
|
|
11 |
|
12 |
feature_extractor = ViTFeatureExtractor.from_pretrained('rizvandwiki/gender-classification')
|
13 |
model = ViTForImageClassification.from_pretrained('rizvandwiki/gender-classification')
|