Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
# Not ready to use yet
|
|
|
2 |
import argparse
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
@@ -93,7 +94,7 @@ def preprocess_image(image, background_choice, foreground_ratio, backgroud_color
|
|
93 |
image = add_background(image, backgroud_color)
|
94 |
return image.convert("RGB")
|
95 |
|
96 |
-
|
97 |
def gen_image(input_image, seed, scale, step):
|
98 |
global pipeline, model, args
|
99 |
pipeline.set_seed(seed)
|
|
|
1 |
# Not ready to use yet
|
2 |
+
import spaces
|
3 |
import argparse
|
4 |
import numpy as np
|
5 |
import gradio as gr
|
|
|
94 |
image = add_background(image, backgroud_color)
|
95 |
return image.convert("RGB")
|
96 |
|
97 |
+
@spaces.GPU
|
98 |
def gen_image(input_image, seed, scale, step):
|
99 |
global pipeline, model, args
|
100 |
pipeline.set_seed(seed)
|