Commit
·
4a4d7e2
1
Parent(s):
692387f
fix images indexes pt 4
Browse files
app.py
CHANGED
|
@@ -187,7 +187,7 @@ def main():
|
|
| 187 |
def redirect():
|
| 188 |
pass
|
| 189 |
|
| 190 |
-
def save_results(answers):
|
| 191 |
api_token = os.getenv("HUGGINGFACE_TOKEN")
|
| 192 |
if not api_token:
|
| 193 |
raise ValueError("Hugging Face API token not found. Please set the HF_API_TOKEN environment variable.")
|
|
@@ -295,7 +295,7 @@ def main():
|
|
| 295 |
finish_button.click(
|
| 296 |
add_answer, inputs=[dropdown1, dropdown2, dropdown3, dropdown4, answers],outputs=answers
|
| 297 |
).then(
|
| 298 |
-
save_results, inputs=answers
|
| 299 |
).then(
|
| 300 |
redirect, js="window.location = 'https://marcoparola.github.io/saliency-evaluation-app/end'")
|
| 301 |
|
|
|
|
| 187 |
def redirect():
|
| 188 |
pass
|
| 189 |
|
| 190 |
+
def save_results(answers, img_ids):
|
| 191 |
api_token = os.getenv("HUGGINGFACE_TOKEN")
|
| 192 |
if not api_token:
|
| 193 |
raise ValueError("Hugging Face API token not found. Please set the HF_API_TOKEN environment variable.")
|
|
|
|
| 295 |
finish_button.click(
|
| 296 |
add_answer, inputs=[dropdown1, dropdown2, dropdown3, dropdown4, answers],outputs=answers
|
| 297 |
).then(
|
| 298 |
+
save_results, inputs=[answers, img_ids]
|
| 299 |
).then(
|
| 300 |
redirect, js="window.location = 'https://marcoparola.github.io/saliency-evaluation-app/end'")
|
| 301 |
|