multimodalart HF Staff commited on
Commit
13b06b1
·
verified ·
1 Parent(s): 7a6abba

[Admin maintenance] Migrate grant to ZeroGPU

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,7 +2,7 @@
2
  This file is used for deploying hugging face demo:
3
  https://huggingface.co/spaces/sczhou/CodeFormer
4
  """
5
-
6
  import sys
7
  sys.path.append('CodeFormer')
8
  import os
@@ -118,6 +118,7 @@ codeformer_net.eval()
118
 
119
  os.makedirs('output', exist_ok=True)
120
 
 
121
  def inference(image, face_align, background_enhance, face_upsample, upscale, codeformer_fidelity):
122
  """Run a single prediction on the model"""
123
  try: # global try
 
2
  This file is used for deploying hugging face demo:
3
  https://huggingface.co/spaces/sczhou/CodeFormer
4
  """
5
+ import spaces
6
  import sys
7
  sys.path.append('CodeFormer')
8
  import os
 
118
 
119
  os.makedirs('output', exist_ok=True)
120
 
121
+ @spaces.GPU
122
  def inference(image, face_align, background_enhance, face_upsample, upscale, codeformer_fidelity):
123
  """Run a single prediction on the model"""
124
  try: # global try