Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -627,7 +627,7 @@ def preprocess_img(input_image_path, raw_image_path, session_id = None):
|
|
| 627 |
if input_image_path is None:
|
| 628 |
return None, None
|
| 629 |
|
| 630 |
-
if raw_image_path
|
| 631 |
raw_image_path = input_image_path
|
| 632 |
|
| 633 |
image = Image.open(raw_image_path).convert("RGB")
|
|
@@ -896,16 +896,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 896 |
''
|
| 897 |
],
|
| 898 |
|
| 899 |
-
],
|
| 900 |
-
label="Cached Examples",
|
| 901 |
-
inputs=[image_input, audio_input, text_input, num_steps, raw_img_text],
|
| 902 |
-
outputs=[output_video],
|
| 903 |
-
fn=infer_example,
|
| 904 |
-
cache_examples=True
|
| 905 |
-
)
|
| 906 |
-
|
| 907 |
-
uncached_examples = gr.Examples(
|
| 908 |
-
examples=[
|
| 909 |
[
|
| 910 |
"examples/images/female-007.png",
|
| 911 |
"examples/audios/listen.wav",
|
|
@@ -913,12 +903,15 @@ with gr.Blocks(css=css) as demo:
|
|
| 913 |
8,
|
| 914 |
''
|
| 915 |
],
|
|
|
|
| 916 |
],
|
| 917 |
-
label="
|
| 918 |
-
inputs=[image_input
|
| 919 |
-
|
|
|
|
|
|
|
| 920 |
)
|
| 921 |
-
|
| 922 |
image_examples = gr.Examples(
|
| 923 |
examples=[
|
| 924 |
[
|
|
|
|
| 627 |
if input_image_path is None:
|
| 628 |
return None, None
|
| 629 |
|
| 630 |
+
if raw_image_path == '':
|
| 631 |
raw_image_path = input_image_path
|
| 632 |
|
| 633 |
image = Image.open(raw_image_path).convert("RGB")
|
|
|
|
| 896 |
''
|
| 897 |
],
|
| 898 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 899 |
[
|
| 900 |
"examples/images/female-007.png",
|
| 901 |
"examples/audios/listen.wav",
|
|
|
|
| 903 |
8,
|
| 904 |
''
|
| 905 |
],
|
| 906 |
+
|
| 907 |
],
|
| 908 |
+
label="Cached Examples",
|
| 909 |
+
inputs=[image_input, audio_input, text_input, num_steps, raw_img_text],
|
| 910 |
+
outputs=[output_video],
|
| 911 |
+
fn=infer_example,
|
| 912 |
+
cache_examples=True
|
| 913 |
)
|
| 914 |
+
|
| 915 |
image_examples = gr.Examples(
|
| 916 |
examples=[
|
| 917 |
[
|