Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Define el modelo y carga los pesos guardados
|
2 |
model = efficientnet_b0(weights=EfficientNet_B0_Weights.DEFAULT)
|
3 |
model.classifier[1] = torch.nn.Linear(in_features=1280, out_features=101)
|
|
|
1 |
+
import torch
|
2 |
+
from torchvision import transforms, datasets
|
3 |
+
from torchvision.models import efficientnet_b0, EfficientNet_B0_Weights
|
4 |
+
from torchvision.transforms.functional import InterpolationMode
|
5 |
+
from PIL import Image
|
6 |
+
import gradio as gr
|
7 |
+
|
8 |
# Define el modelo y carga los pesos guardados
|
9 |
model = efficientnet_b0(weights=EfficientNet_B0_Weights.DEFAULT)
|
10 |
model.classifier[1] = torch.nn.Linear(in_features=1280, out_features=101)
|