TuanScientist commited on
Commit
4dfdf04
·
verified ·
1 Parent(s): 360b651

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(pretrained=True)
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.inputs.Image(label="Image")
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 = [