Hawk3388 commited on
Commit
2a73d35
·
verified ·
1 Parent(s): 03d6964

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -90,10 +90,10 @@ def solve_worksheet(image_path: str):
90
  if not _is_allowed_image(image_path):
91
  raise gr.Error("Please upload a valid image file (PNG, JPG, JPEG, WEBP, BMP).")
92
 
93
- try:
94
- model_path = ensure_gap_model()
95
- except Exception as error:
96
- raise gr.Error(f"Could not load the gap detection model: {error}") from error
97
 
98
  with tempfile.TemporaryDirectory() as tmp_dir:
99
  unique_id = uuid.uuid4().hex
@@ -105,7 +105,7 @@ def solve_worksheet(image_path: str):
105
 
106
  solver = WorksheetSolver(
107
  input_path,
108
- gap_detection_model_path=model_path,
109
  llm_model_name="gemini-3-flash-preview",
110
  think=True,
111
  local=False,
 
90
  if not _is_allowed_image(image_path):
91
  raise gr.Error("Please upload a valid image file (PNG, JPG, JPEG, WEBP, BMP).")
92
 
93
+ # try:
94
+ # model_path = ensure_gap_model()
95
+ # except Exception as error:
96
+ # raise gr.Error(f"Could not load the gap detection model: {error}") from error
97
 
98
  with tempfile.TemporaryDirectory() as tmp_dir:
99
  unique_id = uuid.uuid4().hex
 
105
 
106
  solver = WorksheetSolver(
107
  input_path,
108
+ gap_detection_model_path=GAP_DETECTION_MODEL_PATH,
109
  llm_model_name="gemini-3-flash-preview",
110
  think=True,
111
  local=False,