Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -210,7 +210,6 @@ def process_survey(*all_inputs: Any) -> str:
|
|
| 210 |
if len(all_inputs) != EXPECTED_COUNT:
|
| 211 |
return f"Erreur: Le nombre d'entrées reçues est incorrect ({len(all_inputs)} au lieu de {EXPECTED_COUNT}). Veuillez vérifier la structure."
|
| 212 |
|
| 213 |
-
# FIX APPLIED: Corrected the SyntaxError by completing the list() call and slicing the tuple.
|
| 214 |
# The first element is the hidden language state ('FR')
|
| 215 |
data_values = list(all_inputs[1:])
|
| 216 |
|
|
@@ -457,13 +456,14 @@ with gr.Blocks(title=LANG["TITLE"], css=".gradio-container { max-width: 1200px;
|
|
| 457 |
submit_btn = gr.Button(LANG["SUBMIT_BUTTON"], variant="primary")
|
| 458 |
reset_btn = gr.Button(LANG["RESET_BUTTON"])
|
| 459 |
|
|
|
|
| 460 |
submit_btn.click(
|
| 461 |
fn=process_survey,
|
| 462 |
-
inputs=ALL_INPUT_COMPONENTS,
|
| 463 |
outputs=output_message
|
| 464 |
)
|
| 465 |
|
| 466 |
-
#
|
| 467 |
reset_btn.click(
|
| 468 |
fn=lambda: [None] * len(ALL_INPUT_COMPONENTS[1:]),
|
| 469 |
inputs=[],
|
|
|
|
| 210 |
if len(all_inputs) != EXPECTED_COUNT:
|
| 211 |
return f"Erreur: Le nombre d'entrées reçues est incorrect ({len(all_inputs)} au lieu de {EXPECTED_COUNT}). Veuillez vérifier la structure."
|
| 212 |
|
|
|
|
| 213 |
# The first element is the hidden language state ('FR')
|
| 214 |
data_values = list(all_inputs[1:])
|
| 215 |
|
|
|
|
| 456 |
submit_btn = gr.Button(LANG["SUBMIT_BUTTON"], variant="primary")
|
| 457 |
reset_btn = gr.Button(LANG["RESET_BUTTON"])
|
| 458 |
|
| 459 |
+
# FIX APPLIED HERE: Unpacking the ALL_INPUT_COMPONENTS list to pass inputs individually.
|
| 460 |
submit_btn.click(
|
| 461 |
fn=process_survey,
|
| 462 |
+
inputs=[*ALL_INPUT_COMPONENTS],
|
| 463 |
outputs=output_message
|
| 464 |
)
|
| 465 |
|
| 466 |
+
# Already fixed: Changed '_js' to 'js'
|
| 467 |
reset_btn.click(
|
| 468 |
fn=lambda: [None] * len(ALL_INPUT_COMPONENTS[1:]),
|
| 469 |
inputs=[],
|