Spaces:
Runtime error
Runtime error
disable all apis
Browse files- app_flux.py +1 -0
- app_ltx_video.py +1 -0
- utils.py +7 -3
app_flux.py
CHANGED
@@ -11,6 +11,7 @@ demo = get_app(
|
|
11 |
],
|
12 |
default_model="black-forest-labs/flux-depth-pro",
|
13 |
src=replicate_gradio.registry,
|
|
|
14 |
)
|
15 |
|
16 |
if __name__ == "__main__":
|
|
|
11 |
],
|
12 |
default_model="black-forest-labs/flux-depth-pro",
|
13 |
src=replicate_gradio.registry,
|
14 |
+
is_chat=False
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|
app_ltx_video.py
CHANGED
@@ -9,6 +9,7 @@ demo = get_app(
|
|
9 |
],
|
10 |
default_model="fal-ai/ltx-video/image-to-video",
|
11 |
src=fal_gradio.registry,
|
|
|
12 |
)
|
13 |
|
14 |
if __name__ == "__main__":
|
|
|
9 |
],
|
10 |
default_model="fal-ai/ltx-video/image-to-video",
|
11 |
src=fal_gradio.registry,
|
12 |
+
is_chat=False
|
13 |
)
|
14 |
|
15 |
if __name__ == "__main__":
|
utils.py
CHANGED
@@ -8,6 +8,7 @@ def get_app(
|
|
8 |
default_model: str,
|
9 |
src: Callable[[str, str | None], gr.Blocks] | Literal["models"],
|
10 |
accept_token: bool = False,
|
|
|
11 |
**kwargs,
|
12 |
) -> gr.Blocks:
|
13 |
def update_model(new_model: str) -> list[gr.Column]:
|
@@ -31,8 +32,11 @@ def get_app(
|
|
31 |
queue=False,
|
32 |
)
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
37 |
|
38 |
return demo
|
|
|
8 |
default_model: str,
|
9 |
src: Callable[[str, str | None], gr.Blocks] | Literal["models"],
|
10 |
accept_token: bool = False,
|
11 |
+
is_chat: bool = True,
|
12 |
**kwargs,
|
13 |
) -> gr.Blocks:
|
14 |
def update_model(new_model: str) -> list[gr.Column]:
|
|
|
32 |
queue=False,
|
33 |
)
|
34 |
|
35 |
+
if not is_chat:
|
36 |
+
demo.fns = {}
|
37 |
+
else:
|
38 |
+
for k, v in list(demo.fns.items()):
|
39 |
+
if isinstance(v.api_name, str) and "chat" in v.api_name:
|
40 |
+
del demo.fns[k]
|
41 |
|
42 |
return demo
|