Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import openpyxl
|
|
9 |
import os
|
10 |
|
11 |
# Load the pre-trained EfficientNet-B7 model
|
12 |
-
model = models.efficientnet_b7(
|
13 |
model.eval()
|
14 |
|
15 |
# Define the transformations to be applied to the input image
|
@@ -82,7 +82,7 @@ def predict_house_area(image_file):
|
|
82 |
return f"Predicted house square footage: {predicted_area_sqm:.2f} square meters", temp_file
|
83 |
|
84 |
inputs = [
|
85 |
-
gr.
|
86 |
]
|
87 |
|
88 |
outputs = [
|
|
|
9 |
import os
|
10 |
|
11 |
# Load the pre-trained EfficientNet-B7 model
|
12 |
+
model = torchvision.models.efficientnet_b7(weights=EfficientNet_B7_Weights.DEFAULT)
|
13 |
model.eval()
|
14 |
|
15 |
# Define the transformations to be applied to the input image
|
|
|
82 |
return f"Predicted house square footage: {predicted_area_sqm:.2f} square meters", temp_file
|
83 |
|
84 |
inputs = [
|
85 |
+
gr.Image(label="Image")
|
86 |
]
|
87 |
|
88 |
outputs = [
|