fffiloni commited on
Commit
b47c0c7
1 Parent(s): 462176f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -33,6 +33,7 @@ sys.path.append('src/blip')
33
  sys.path.append('clip-interrogator')
34
 
35
  import gradio as gr
 
36
  from clip_interrogator import Config, Interrogator
37
 
38
  config = Config()
@@ -44,6 +45,7 @@ config.blip_num_beams = 64
44
 
45
  ci = Interrogator(config)
46
 
 
47
  def inference(image, mode, best_max_flavors):
48
  image = image.convert('RGB')
49
  if mode == 'best':
 
33
  sys.path.append('clip-interrogator')
34
 
35
  import gradio as gr
36
+ import spaces
37
  from clip_interrogator import Config, Interrogator
38
 
39
  config = Config()
 
45
 
46
  ci = Interrogator(config)
47
 
48
+ @spaces.GPU
49
  def inference(image, mode, best_max_flavors):
50
  image = image.convert('RGB')
51
  if mode == 'best':