Spaces:
Runtime error
Runtime error
local_storage
Browse files
app.py
CHANGED
|
@@ -986,6 +986,7 @@ with block:
|
|
| 986 |
</big></big></big></p>
|
| 987 |
""")
|
| 988 |
gr.HTML(title_html)
|
|
|
|
| 989 |
with gr.Row():
|
| 990 |
with gr.Column():
|
| 991 |
generation_mode = gr.Radio([["Text-to-Video", "text"], ["Image-to-Video", "image"], ["Video Extension", "video"]], elem_id="generation-mode", label="Generation mode", value = "image")
|
|
@@ -1210,12 +1211,12 @@ with block:
|
|
| 1210 |
)
|
| 1211 |
|
| 1212 |
# Load saved preferences when the page loads
|
| 1213 |
-
|
| 1214 |
-
|
| 1215 |
-
|
| 1216 |
-
|
| 1217 |
-
|
| 1218 |
-
|
| 1219 |
-
|
| 1220 |
|
| 1221 |
block.launch(mcp_server=True, ssr_mode=False)
|
|
|
|
| 986 |
</big></big></big></p>
|
| 987 |
""")
|
| 988 |
gr.HTML(title_html)
|
| 989 |
+
local_storage = gr.BrowserState(default_local_storage)
|
| 990 |
with gr.Row():
|
| 991 |
with gr.Column():
|
| 992 |
generation_mode = gr.Radio([["Text-to-Video", "text"], ["Image-to-Video", "image"], ["Video Extension", "video"]], elem_id="generation-mode", label="Generation mode", value = "image")
|
|
|
|
| 1211 |
)
|
| 1212 |
|
| 1213 |
# Load saved preferences when the page loads
|
| 1214 |
+
block.load(
|
| 1215 |
+
fn=load_preferences, inputs = [
|
| 1216 |
+
local_storage
|
| 1217 |
+
], outputs = [
|
| 1218 |
+
generation_mode
|
| 1219 |
+
]
|
| 1220 |
+
)
|
| 1221 |
|
| 1222 |
block.launch(mcp_server=True, ssr_mode=False)
|