danielhshi8224 commited on
Commit
9d06c04
·
1 Parent(s): 823e041

hf repo fixed

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. testmodel.py +4 -0
app.py CHANGED
@@ -6,7 +6,7 @@ import os
6
 
7
  # Get model path (Windows compatible)
8
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
9
- MODEL_ID = "dshi01/my-benthic-classifier"
10
 
11
  # Try different possible filenames
12
  # possible_names = ['ConvNextmodel.pth', 'convnextmodel.pth', 'ConvNext_model.pth']
 
6
 
7
  # Get model path (Windows compatible)
8
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
9
+ MODEL_ID = "dshi01/convnext-tiny-224-7clss"
10
 
11
  # Try different possible filenames
12
  # possible_names = ['ConvNextmodel.pth', 'convnextmodel.pth', 'ConvNext_model.pth']
testmodel.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from transformers import AutoModelForImageClassification, AutoImageProcessor
2
+ m = AutoModelForImageClassification.from_pretrained("dshi01/convnext-tiny-224-7clss")
3
+ p = AutoImageProcessor.from_pretrained("dshi01/convnext-tiny-224-7clss")
4
+ print(m.config.model_type, m.config.num_labels) # expect convnext, 7 (if set)