Commit
·
da4ecbf
1
Parent(s):
691ccbd
fix
Browse files
app.py
CHANGED
|
@@ -6,10 +6,6 @@ import gradio as gr
|
|
| 6 |
from torchvision.models import resnet50
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
|
| 9 |
-
|
| 10 |
-
from model import resnet50
|
| 11 |
-
model_path = "checkpoint-epcoh24_lr_point1.pth"
|
| 12 |
-
|
| 13 |
def load_model(model_path):
|
| 14 |
model = resnet50(pretrained=False) # Create an instance of the ResNet-50 model
|
| 15 |
state_dict = torch.load(model_path, map_location='cpu') # Load the state dictionary
|
|
|
|
| 6 |
from torchvision.models import resnet50
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
def load_model(model_path):
|
| 10 |
model = resnet50(pretrained=False) # Create an instance of the ResNet-50 model
|
| 11 |
state_dict = torch.load(model_path, map_location='cpu') # Load the state dictionary
|