initial demo
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ import numpy as np
|
|
16 |
import random
|
17 |
|
18 |
import gradio as gr
|
|
|
19 |
|
20 |
# global variable
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
@@ -92,7 +93,7 @@ def get_example():
|
|
92 |
def run_example(img_file):
|
93 |
return generate_image(img_file, 25, 3, 23, 2)
|
94 |
|
95 |
-
|
96 |
def generate_image(image_path, num_steps, guidance_scale, seed, num_images, progress=gr.Progress(track_tqdm=True)):
|
97 |
|
98 |
if image_path is None:
|
|
|
16 |
import random
|
17 |
|
18 |
import gradio as gr
|
19 |
+
import spaces
|
20 |
|
21 |
# global variable
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
93 |
def run_example(img_file):
|
94 |
return generate_image(img_file, 25, 3, 23, 2)
|
95 |
|
96 |
+
@spaces.GPU
|
97 |
def generate_image(image_path, num_steps, guidance_scale, seed, num_images, progress=gr.Progress(track_tqdm=True)):
|
98 |
|
99 |
if image_path is None:
|