Spaces:
Running
Running
Nifemi Alpine Durin
commited on
Commit
·
ec93fba
1
Parent(s):
4196d7f
fix
Browse files
app.py
CHANGED
@@ -125,7 +125,8 @@ function js() {{
|
|
125 |
|
126 |
def get_config(request: Request):
|
127 |
|
128 |
-
|
|
|
129 |
|
130 |
# Initialize with default value
|
131 |
config = {"campaign_details": default_value}
|
@@ -173,7 +174,7 @@ with gr.Blocks(analytics_enabled=False) as iface:
|
|
173 |
live=False
|
174 |
)
|
175 |
|
176 |
-
iface.load(fn=get_config, inputs=
|
177 |
|
178 |
|
179 |
|
|
|
125 |
|
126 |
def get_config(request: Request):
|
127 |
|
128 |
+
if not request or not hasattr(request, 'cookies'):
|
129 |
+
return default_value
|
130 |
|
131 |
# Initialize with default value
|
132 |
config = {"campaign_details": default_value}
|
|
|
174 |
live=False
|
175 |
)
|
176 |
|
177 |
+
iface.load(fn=get_config, inputs=[], outputs=campaign_details_input, js=js)
|
178 |
|
179 |
|
180 |
|