Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,8 +47,8 @@ def load_image_model(token: str):
|
|
47 |
Load the pre-trained skin cancer classification model using PyTorch.
|
48 |
"""
|
49 |
try:
|
50 |
-
extractor = AutoFeatureExtractor.from_pretrained(
|
51 |
-
model = AutoModelForImageClassification.from_pretrained(
|
52 |
return pipeline("image-classification", model=model, feature_extractor=extractor, framework="pt")
|
53 |
except Exception as e:
|
54 |
st.error(f"Error loading the model: {e}")
|
|
|
47 |
Load the pre-trained skin cancer classification model using PyTorch.
|
48 |
"""
|
49 |
try:
|
50 |
+
extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)
|
51 |
+
model = AutoModelForImageClassification.from_pretrained(MODEL_NAME)
|
52 |
return pipeline("image-classification", model=model, feature_extractor=extractor, framework="pt")
|
53 |
except Exception as e:
|
54 |
st.error(f"Error loading the model: {e}")
|