ricklon commited on
Commit
37739bf
·
1 Parent(s): 1c94cf6

Set workspace scale default to 89 percent

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1350,9 +1350,9 @@ def _scale_workspace_image(img, workspace_scale):
1350
  if img is None:
1351
  return None
1352
  try:
1353
- scale = max(100, min(220, int(workspace_scale)))
1354
  except Exception:
1355
- scale = 100
1356
  if scale == 100:
1357
  return img
1358
  ratio = scale / 100.0
@@ -1484,10 +1484,10 @@ with gr.Blocks(**blocks_kwargs) as demo:
1484
  task = gr.Dropdown(list(TASK_PROMPTS.keys()), value="📋 Markdown", label="Task")
1485
  input_scope = gr.Radio(["Entire Page", "Selected Region"], value="Entire Page", label="Input Scope")
1486
  workspace_scale = gr.Slider(
1487
- minimum=100,
1488
  maximum=220,
1489
- step=10,
1490
- value=140,
1491
  label="Workspace Scale (%)",
1492
  info="Use this instead of in-canvas zoom for smoother live drawing.",
1493
  )
 
1350
  if img is None:
1351
  return None
1352
  try:
1353
+ scale = max(60, min(220, int(workspace_scale)))
1354
  except Exception:
1355
+ scale = 89
1356
  if scale == 100:
1357
  return img
1358
  ratio = scale / 100.0
 
1484
  task = gr.Dropdown(list(TASK_PROMPTS.keys()), value="📋 Markdown", label="Task")
1485
  input_scope = gr.Radio(["Entire Page", "Selected Region"], value="Entire Page", label="Input Scope")
1486
  workspace_scale = gr.Slider(
1487
+ minimum=60,
1488
  maximum=220,
1489
+ step=1,
1490
+ value=89,
1491
  label="Workspace Scale (%)",
1492
  info="Use this instead of in-canvas zoom for smoother live drawing.",
1493
  )