huy-ha commited on
Commit
09dc5c4
·
1 Parent(s): 19d656f

numpy from PIL

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -20,8 +20,8 @@ def generate_relevancy(
20
  ):
21
  labels = labels.split(",")
22
  prompts = [prompt]
 
23
  assert img.dtype == np.uint8
24
- img = Image.fromarray(img).resize((244 * 2, 244 * 2))
25
  h, w, c = img.shape
26
  grads = ClipWrapper.get_clip_saliency(
27
  img=img,
@@ -77,4 +77,5 @@ iface = gr.Interface(
77
  ]
78
  ],
79
  )
 
80
  iface.launch()
 
20
  ):
21
  labels = labels.split(",")
22
  prompts = [prompt]
23
+ img = np.asarray(Image.fromarray(img).resize((244 * 2, 244 * 2)))
24
  assert img.dtype == np.uint8
 
25
  h, w, c = img.shape
26
  grads = ClipWrapper.get_clip_saliency(
27
  img=img,
 
77
  ]
78
  ],
79
  )
80
+ # iface.launch(share=True)
81
  iface.launch()