Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,6 @@ from torchvision import transforms
|
|
| 4 |
from torchvision.models import efficientnet_b0
|
| 5 |
import gradio as gr
|
| 6 |
import numpy as np
|
| 7 |
-
import pickle
|
| 8 |
-
import os
|
| 9 |
from PIL import Image
|
| 10 |
import joblib
|
| 11 |
import json
|
|
@@ -14,7 +12,7 @@ from sklearn.tree import export_text
|
|
| 14 |
# Constants
|
| 15 |
NUM_CLASSES = 4
|
| 16 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 17 |
-
CLASS_NAMES = [
|
| 18 |
|
| 19 |
# Load the CNN model
|
| 20 |
def load_cnn_model():
|
|
|
|
| 4 |
from torchvision.models import efficientnet_b0
|
| 5 |
import gradio as gr
|
| 6 |
import numpy as np
|
|
|
|
|
|
|
| 7 |
from PIL import Image
|
| 8 |
import joblib
|
| 9 |
import json
|
|
|
|
| 12 |
# Constants
|
| 13 |
NUM_CLASSES = 4
|
| 14 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 15 |
+
CLASS_NAMES = ['Cracked_road', 'Flooded_muddy', 'Good_condition', 'Potholes']
|
| 16 |
|
| 17 |
# Load the CNN model
|
| 18 |
def load_cnn_model():
|