Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -514,20 +514,21 @@ async def predict(image):
|
|
514 |
|
515 |
<script>
|
516 |
document.querySelectorAll('button[id^="Dog"]').forEach(button => {
|
517 |
-
console.log('Attaching event to button: ' + button.id);
|
518 |
button.addEventListener('click', () => {
|
519 |
const button_id = button.id;
|
520 |
-
console.log('Button clicked: ' + button_id);
|
521 |
const radio = document.querySelector('input[type=radio][value="' + button_id + '"]');
|
522 |
if (radio) {
|
523 |
radio.click();
|
524 |
-
console.log('Radio button clicked for: ' + button_id);
|
525 |
} else {
|
526 |
-
console.error("Radio button not found for: " + button_id);
|
527 |
}
|
528 |
});
|
529 |
});
|
530 |
</script>
|
|
|
531 |
"""
|
532 |
|
533 |
initial_state = {
|
|
|
514 |
|
515 |
<script>
|
516 |
document.querySelectorAll('button[id^="Dog"]').forEach(button => {
|
517 |
+
console.log('Attaching event to button: ' + button.id);
|
518 |
button.addEventListener('click', () => {
|
519 |
const button_id = button.id;
|
520 |
+
console.log('Button clicked: ' + button_id);
|
521 |
const radio = document.querySelector('input[type=radio][value="' + button_id + '"]');
|
522 |
if (radio) {
|
523 |
radio.click();
|
524 |
+
console.log('Radio button clicked for: ' + button_id);
|
525 |
} else {
|
526 |
+
console.error("Radio button not found for: " + button_id);
|
527 |
}
|
528 |
});
|
529 |
});
|
530 |
</script>
|
531 |
+
|
532 |
"""
|
533 |
|
534 |
initial_state = {
|