Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ from PIL import Image
|
|
5 |
import gradio as gr
|
6 |
|
7 |
# Load your trained ResNet-50 model
|
8 |
-
model = models.resnet50(pretrained=False) # Load ResNet-50 architecture
|
9 |
-
model.load_state_dict(torch.load("model.pth")) # Load the trained weights
|
10 |
model.eval() # Set model to evaluation mode
|
11 |
|
12 |
# Define the transformation required for the input image
|
|
|
5 |
import gradio as gr
|
6 |
|
7 |
# Load your trained ResNet-50 model
|
8 |
+
model = models.resnet50(pretrained=False) # Load the ResNet-50 architecture
|
9 |
+
model.load_state_dict(torch.load("model.pth")) # Load the trained weights (.pth)
|
10 |
model.eval() # Set model to evaluation mode
|
11 |
|
12 |
# Define the transformation required for the input image
|