admin commited on
Commit
6919422
·
1 Parent(s): 83e18dc
Files changed (3) hide show
  1. README.md +1 -3
  2. model.py +3 -13
  3. requirements.txt +1 -2
README.md CHANGED
@@ -9,6 +9,4 @@ app_file: app.py
9
  pinned: false
10
  license: mit
11
  short_description: Frame-level guzheng playing technique detector
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  pinned: false
10
  license: mit
11
  short_description: Frame-level guzheng playing technique detector
12
+ ---
 
 
model.py CHANGED
@@ -3,7 +3,7 @@ import torch.nn as nn
3
  import torch.nn.functional as F
4
  import torchvision.models as models
5
  import numpy as np
6
- from modelscope.msdatasets import MsDataset
7
 
8
 
9
  class Interpolate(nn.Module):
@@ -79,12 +79,7 @@ class EvalNet:
79
  raise ValueError("[Backbone not found] Please check if --model is correct!")
80
 
81
  def _model_info(self, backbone: str):
82
- backbone_list = MsDataset.load(
83
- "monetjoe/cv_backbones",
84
- split=self.imgnet_ver,
85
- cache_dir="./__pycache__",
86
- trust_remote_code=True,
87
- )
88
  backbone_info = self._get_backbone(backbone, backbone_list)
89
  return (
90
  str(backbone_info["type"]),
@@ -233,12 +228,7 @@ class t_EvalNet:
233
  raise ValueError("[Backbone not found] Please check if --model is correct!")
234
 
235
  def _model_info(self, backbone: str):
236
- backbone_list = MsDataset.load(
237
- "monetjoe/cv_backbones",
238
- split=self.imgnet_ver,
239
- cache_dir="./__pycache__",
240
- trust_remote_code=True,
241
- )
242
  backbone_info = self._get_backbone(backbone, backbone_list)
243
  return (
244
  str(backbone_info["type"]),
 
3
  import torch.nn.functional as F
4
  import torchvision.models as models
5
  import numpy as np
6
+ from datasets import load_dataset
7
 
8
 
9
  class Interpolate(nn.Module):
 
79
  raise ValueError("[Backbone not found] Please check if --model is correct!")
80
 
81
  def _model_info(self, backbone: str):
82
+ backbone_list = load_dataset("monetjoe/cv_backbones", split="train")
 
 
 
 
 
83
  backbone_info = self._get_backbone(backbone, backbone_list)
84
  return (
85
  str(backbone_info["type"]),
 
228
  raise ValueError("[Backbone not found] Please check if --model is correct!")
229
 
230
  def _model_info(self, backbone: str):
231
+ backbone_list = load_dataset("monetjoe/cv_backbones", split="train")
 
 
 
 
 
232
  backbone_info = self._get_backbone(backbone, backbone_list)
233
  return (
234
  str(backbone_info["type"]),
requirements.txt CHANGED
@@ -2,5 +2,4 @@ torch
2
  pillow
3
  librosa
4
  matplotlib
5
- torchvision
6
- modelscope==1.15
 
2
  pillow
3
  librosa
4
  matplotlib
5
+ torchvision