LN1996 commited on
Commit
25a9813
·
verified ·
1 Parent(s): 866deff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -10,6 +10,7 @@ import requests
10
  from io import BytesIO
11
  from google.cloud import vision
12
  from google.oauth2 import service_account
 
13
 
14
  credentials = {
15
  "type": "service_account",
@@ -103,9 +104,10 @@ def casa_ai_run_tab3(dict=None):
103
  if selected_crop is None:
104
  print('Please provide cropped object')
105
  return None
 
 
106
 
107
- # results = GP.inference(selected_crop)
108
- results = [selected_crop]
109
  return results
110
 
111
  with gr.Blocks() as casa:
 
10
  from io import BytesIO
11
  from google.cloud import vision
12
  from google.oauth2 import service_account
13
+ import PIL
14
 
15
  credentials = {
16
  "type": "service_account",
 
104
  if selected_crop is None:
105
  print('Please provide cropped object')
106
  return None
107
+
108
+ selected_crop = PIL.Image.fromarray(selected_crop)
109
 
110
+ results = GP.inference(selected_crop)
 
111
  return results
112
 
113
  with gr.Blocks() as casa: