Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import torch
|
2 |
import gradio as gr
|
3 |
from gradio import processing_utils, utils
|
@@ -106,6 +107,7 @@ def convert_to_base64(pil_image):
|
|
106 |
return base64_image
|
107 |
|
108 |
# Inference function
|
|
|
109 |
def inference(
|
110 |
control_image: Image.Image,
|
111 |
prompt: str,
|
@@ -267,7 +269,7 @@ with gr.Blocks() as app:
|
|
267 |
queue=False,
|
268 |
postprocess=False
|
269 |
)
|
270 |
-
share_button.click(None, [], [],
|
271 |
|
272 |
with gr.Blocks(css=css) as app_with_history:
|
273 |
with gr.Tab("Demo"):
|
|
|
1 |
+
import spaces
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
from gradio import processing_utils, utils
|
|
|
107 |
return base64_image
|
108 |
|
109 |
# Inference function
|
110 |
+
@spaces.GPU
|
111 |
def inference(
|
112 |
control_image: Image.Image,
|
113 |
prompt: str,
|
|
|
269 |
queue=False,
|
270 |
postprocess=False
|
271 |
)
|
272 |
+
share_button.click(None, [], [], js=share_js)
|
273 |
|
274 |
with gr.Blocks(css=css) as app_with_history:
|
275 |
with gr.Tab("Demo"):
|