nprasad24 commited on
Commit
2014617
·
verified ·
1 Parent(s): 5cfc086

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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")