shsolanki commited on
Commit
73e1521
·
verified ·
1 Parent(s): 841615f

update to use zeroGPU (#2)

Browse files

- update to use zeroGPU (3e7f531b7563c153c2e58bd11e203e6e039f13cb)

Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -3,6 +3,7 @@ import numpy as np
3
  from PIL import Image
4
  import torch
5
  import os
 
6
  from pipeline_difix import DifixPipeline
7
  from diffusers.utils import load_image
8
  import gradio.themes as gr_themes
@@ -113,6 +114,7 @@ def initialize_pipeline():
113
  logger.error(f"Pipeline initialization failed: {e}")
114
  raise
115
 
 
116
  def process_image(image):
117
  """
118
  Process the input image using the Difix pipeline to remove artifacts.
 
3
  from PIL import Image
4
  import torch
5
  import os
6
+ import spaces
7
  from pipeline_difix import DifixPipeline
8
  from diffusers.utils import load_image
9
  import gradio.themes as gr_themes
 
114
  logger.error(f"Pipeline initialization failed: {e}")
115
  raise
116
 
117
+ @spaces.GPU
118
  def process_image(image):
119
  """
120
  Process the input image using the Difix pipeline to remove artifacts.