jaydeepb commited on
Commit
8d42849
·
verified ·
1 Parent(s): 1dbc4b5

Fix runtime: bump Gradio SDK to 5.49.1 (hub-1.x compatible), pin transformers==5.9.0, dtype= kwarg

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. byo_features.py +1 -1
  3. requirements.txt +2 -2
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🔎
4
  colorFrom: indigo
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: indigo
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
  ---
byo_features.py CHANGED
@@ -20,7 +20,7 @@ class BYOExtractor:
20
  self.device = device or ("cuda" if torch.cuda.is_available() else "cpu")
21
  self.tok = AutoTokenizer.from_pretrained(model_path)
22
  self.model = AutoModelForCausalLM.from_pretrained(
23
- model_path, torch_dtype=torch.float32).to(self.device).eval()
24
 
25
  def _cont_loss(self, ids):
26
  logits = self.model(ids).logits
 
20
  self.device = device or ("cuda" if torch.cuda.is_available() else "cpu")
21
  self.tok = AutoTokenizer.from_pretrained(model_path)
22
  self.model = AutoModelForCausalLM.from_pretrained(
23
+ model_path, dtype=torch.float32).to(self.device).eval()
24
 
25
  def _cont_loss(self, ids):
26
  logits = self.model(ids).logits
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  spaces
2
- gradio>=4.44
3
- transformers>=4.44
4
  torch>=2.8
5
  scikit-learn==1.7.2
6
  pandas>=2.0
 
1
  spaces
2
+ gradio>=5,<6
3
+ transformers==5.9.0
4
  torch>=2.8
5
  scikit-learn==1.7.2
6
  pandas>=2.0