Nanny7 commited on
Commit
984d0a8
·
1 Parent(s): d5c7f76

Fix Gradio API schema TypeError in validator_gui.py

Browse files

- Fixed update_file_info function to return values instead of gr.Number objects
- Fixed toggle_range_inputs to use gr.update() instead of creating new Number objects
- This resolves the 'TypeError: argument of type bool is not iterable' in HF Spaces

__pycache__/validator_gui.cpython-313.pyc ADDED
Binary file (27.7 kB). View file
 
validator_gui.py CHANGED
@@ -505,8 +505,8 @@ class ValidatorGUI:
505
  full_path = os.path.join(os.getcwd(), file_path)
506
  summary, total, math_q = self.analyze_file(full_path)
507
  # Update end question to match file
508
- return summary, gr.Number(value=math_q, maximum=math_q)
509
- return "No file selected", gr.Number(value=100)
510
 
511
  def refresh_files():
512
  files = self.get_excel_files()
@@ -520,7 +520,7 @@ class ValidatorGUI:
520
 
521
  def toggle_range_inputs(use_all):
522
  # Enable/disable range inputs based on checkbox
523
- return gr.Number(interactive=not use_all), gr.Number(interactive=not use_all)
524
 
525
  def run_with_clean_models(file_path, solver, recon, images, parallel, batch,
526
  use_all, start_q, end_q, compile_tex):
 
505
  full_path = os.path.join(os.getcwd(), file_path)
506
  summary, total, math_q = self.analyze_file(full_path)
507
  # Update end question to match file
508
+ return summary, math_q
509
+ return "No file selected", 100
510
 
511
  def refresh_files():
512
  files = self.get_excel_files()
 
520
 
521
  def toggle_range_inputs(use_all):
522
  # Enable/disable range inputs based on checkbox
523
+ return gr.update(interactive=not use_all), gr.update(interactive=not use_all)
524
 
525
  def run_with_clean_models(file_path, solver, recon, images, parallel, batch,
526
  use_all, start_q, end_q, compile_tex):