DawnC commited on
Commit
5a3e9ec
·
1 Parent(s): 488273c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -506,17 +506,18 @@ async def predict(image):
506
  </style>
507
  {dogs_info}
508
  <script>
509
- function handle_button_click(button_id) {
510
  const radio = document.querySelector('input[type=radio][value="' + button_id + '"]');
511
- if (radio) {
512
  radio.click(); // 點擊按鈕後觸發事件
513
- } else {
514
  console.error("Radio button not found:", button_id);
515
- }
516
- }
517
  </script>
518
  """
519
 
 
520
  initial_state = {
521
  "dogs_info": dogs_info,
522
  "buttons": buttons,
 
506
  </style>
507
  {dogs_info}
508
  <script>
509
+ function handle_button_click(button_id) {{
510
  const radio = document.querySelector('input[type=radio][value="' + button_id + '"]');
511
+ if (radio) {{
512
  radio.click(); // 點擊按鈕後觸發事件
513
+ }} else {{
514
  console.error("Radio button not found:", button_id);
515
+ }}
516
+ }}
517
  </script>
518
  """
519
 
520
+
521
  initial_state = {
522
  "dogs_info": dogs_info,
523
  "buttons": buttons,