Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,8 @@ def image_to_query(image):
|
|
32 |
|
33 |
output: Query for the LLM
|
34 |
"""
|
35 |
-
image = Image.open(image)
|
|
|
36 |
|
37 |
model = AutoModelForImageClassification.from_pretrained("nprasad24/bean_classifier", from_tf=True)
|
38 |
image_processor = AutoImageProcessor.from_pretrained("nprasad24/bean_classifier")
|
|
|
32 |
|
33 |
output: Query for the LLM
|
34 |
"""
|
35 |
+
#image = Image.open(image)
|
36 |
+
image = Image.fromarray(image.astype('uint8'), 'RGB')
|
37 |
|
38 |
model = AutoModelForImageClassification.from_pretrained("nprasad24/bean_classifier", from_tf=True)
|
39 |
image_processor = AutoImageProcessor.from_pretrained("nprasad24/bean_classifier")
|