Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import random
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
@@ -27,7 +27,7 @@ pipe.to("cuda:0", torch.float16)
|
|
27 |
|
28 |
|
29 |
### gradio
|
30 |
-
|
31 |
def generate(text, num_inference_steps, cfg_scale, seed):
|
32 |
setup_seed(int(seed))
|
33 |
num_inference_steps = int(num_inference_steps)
|
@@ -126,5 +126,4 @@ with gr.Blocks(title="PeRFlow-SDXL", css=css) as interface:
|
|
126 |
|
127 |
if __name__ == '__main__':
|
128 |
interface.queue(max_size=10)
|
129 |
-
|
130 |
-
interface.launch(share=True)
|
|
|
1 |
+
import spaces
|
2 |
import random
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
|
|
27 |
|
28 |
|
29 |
### gradio
|
30 |
+
@spaces.GPU
|
31 |
def generate(text, num_inference_steps, cfg_scale, seed):
|
32 |
setup_seed(int(seed))
|
33 |
num_inference_steps = int(num_inference_steps)
|
|
|
126 |
|
127 |
if __name__ == '__main__':
|
128 |
interface.queue(max_size=10)
|
129 |
+
interface.launch()
|
|