jhickman51 commited on
Commit
cb2f599
·
1 Parent(s): 3481f1b
Files changed (2) hide show
  1. app.py +6 -0
  2. params.py +1 -1
app.py CHANGED
@@ -3,6 +3,12 @@ from collections.abc import Iterator
3
  from pathlib import Path
4
  from threading import Thread
5
 
 
 
 
 
 
 
6
  import gradio as gr
7
  import spaces
8
  import torch
 
3
  from pathlib import Path
4
  from threading import Thread
5
 
6
+ # Disable opt-out telemetry hooks before importing Gradio, Spaces, Transformers,
7
+ # or Hugging Face Hub.
8
+ os.environ.setdefault("DO_NOT_TRACK", "1")
9
+ os.environ.setdefault("HF_HUB_DISABLE_TELEMETRY", "1")
10
+ os.environ.setdefault("GRADIO_ANALYTICS_ENABLED", "False")
11
+
12
  import gradio as gr
13
  import spaces
14
  import torch
params.py CHANGED
@@ -45,7 +45,7 @@ class ParamSpec:
45
  # (validate_params) and the UI controls (ui_config, injected into the page)
46
  # derive from this, so the ranges/defaults are defined in exactly one place.
47
  PARAM_SPECS: dict[str, ParamSpec] = {
48
- "max_new_tokens": ParamSpec(minimum=100, maximum=4000, default=2000, is_int=True, step=10),
49
  "image_token_budget": ParamSpec(
50
  minimum=70, maximum=1120, default=280, is_int=True, choices=(70, 140, 280, 560, 1120)
51
  ),
 
45
  # (validate_params) and the UI controls (ui_config, injected into the page)
46
  # derive from this, so the ranges/defaults are defined in exactly one place.
47
  PARAM_SPECS: dict[str, ParamSpec] = {
48
+ "max_new_tokens": ParamSpec(minimum=1000, maximum=40000, default=20000, is_int=True, step=100),
49
  "image_token_budget": ParamSpec(
50
  minimum=70, maximum=1120, default=280, is_int=True, choices=(70, 140, 280, 560, 1120)
51
  ),