Spaces:
Runtime error
Runtime error
Turn on caching mechanism
Browse files- app_canny.py +1 -1
- app_canny_db.py +1 -1
- app_pix2pix_video.py +2 -2
- app_pose.py +1 -1
- app_text_to_video.py +2 -2
app_canny.py
CHANGED
|
@@ -44,7 +44,7 @@ def create_demo(model: Model):
|
|
| 44 |
inputs=inputs,
|
| 45 |
outputs=result,
|
| 46 |
fn=model.process_controlnet_canny,
|
| 47 |
-
|
| 48 |
run_on_click=False,
|
| 49 |
)
|
| 50 |
|
|
|
|
| 44 |
inputs=inputs,
|
| 45 |
outputs=result,
|
| 46 |
fn=model.process_controlnet_canny,
|
| 47 |
+
cache_examples = True,
|
| 48 |
run_on_click=False,
|
| 49 |
)
|
| 50 |
|
app_canny_db.py
CHANGED
|
@@ -71,7 +71,7 @@ def create_demo(model: Model):
|
|
| 71 |
inputs=inputs,
|
| 72 |
outputs=result,
|
| 73 |
fn=model.process_controlnet_canny_db,
|
| 74 |
-
|
| 75 |
)
|
| 76 |
|
| 77 |
run_button.click(fn=model.process_controlnet_canny_db,
|
|
|
|
| 71 |
inputs=inputs,
|
| 72 |
outputs=result,
|
| 73 |
fn=model.process_controlnet_canny_db,
|
| 74 |
+
cache_examples = True,
|
| 75 |
)
|
| 76 |
|
| 77 |
run_button.click(fn=model.process_controlnet_canny_db,
|
app_pix2pix_video.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from model import Model
|
| 3 |
-
import os
|
| 4 |
|
| 5 |
|
| 6 |
def create_demo(model: Model):
|
|
@@ -70,7 +69,8 @@ def create_demo(model: Model):
|
|
| 70 |
gr.Examples(examples=examples,
|
| 71 |
inputs=inputs,
|
| 72 |
outputs=result,
|
| 73 |
-
|
|
|
|
| 74 |
run_on_click=False,
|
| 75 |
)
|
| 76 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from model import Model
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
def create_demo(model: Model):
|
|
|
|
| 69 |
gr.Examples(examples=examples,
|
| 70 |
inputs=inputs,
|
| 71 |
outputs=result,
|
| 72 |
+
fn=model.process_pix2pix,
|
| 73 |
+
cache_examples=True,
|
| 74 |
run_on_click=False,
|
| 75 |
)
|
| 76 |
|
app_pose.py
CHANGED
|
@@ -48,8 +48,8 @@ def create_demo(model: Model):
|
|
| 48 |
gr.Examples(examples=examples,
|
| 49 |
inputs=inputs,
|
| 50 |
outputs=result,
|
| 51 |
-
# cache_examples=os.getenv('SYSTEM') == 'spaces',
|
| 52 |
fn=model.process_controlnet_pose,
|
|
|
|
| 53 |
run_on_click=False,
|
| 54 |
)
|
| 55 |
|
|
|
|
| 48 |
gr.Examples(examples=examples,
|
| 49 |
inputs=inputs,
|
| 50 |
outputs=result,
|
|
|
|
| 51 |
fn=model.process_controlnet_pose,
|
| 52 |
+
cache_examples = True,
|
| 53 |
run_on_click=False,
|
| 54 |
)
|
| 55 |
|
app_text_to_video.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from model import Model
|
| 3 |
from functools import partial
|
| 4 |
-
import os
|
| 5 |
|
| 6 |
examples = [
|
| 7 |
["an astronaut waving the arm on the moon"],
|
|
@@ -62,7 +61,8 @@ def create_demo(model: Model):
|
|
| 62 |
gr.Examples(examples=examples,
|
| 63 |
inputs=inputs,
|
| 64 |
outputs=result,
|
| 65 |
-
|
|
|
|
| 66 |
run_on_click=False,
|
| 67 |
)
|
| 68 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from model import Model
|
| 3 |
from functools import partial
|
|
|
|
| 4 |
|
| 5 |
examples = [
|
| 6 |
["an astronaut waving the arm on the moon"],
|
|
|
|
| 61 |
gr.Examples(examples=examples,
|
| 62 |
inputs=inputs,
|
| 63 |
outputs=result,
|
| 64 |
+
fn=model.process_text2video,
|
| 65 |
+
cache_examples=True,
|
| 66 |
run_on_click=False,
|
| 67 |
)
|
| 68 |
|