monate615 commited on
Commit
bcea9c8
·
verified ·
1 Parent(s): 4d512a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -43,3 +43,16 @@ def inference(input_image: Image.Image) -> Image.Image:
43
  except Exception as e:
44
  print(f"Error during image enhancement: {e}")
45
  return input_image # Return the original image if there's an error
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  except Exception as e:
44
  print(f"Error during image enhancement: {e}")
45
  return input_image # Return the original image if there's an error
46
+
47
+ # Create the Gradio interface
48
+ iface = gr.Interface(
49
+ fn=inference,
50
+ inputs=gr.Image(type="pil"),
51
+ outputs=gr.Image(type="pil"),
52
+ title="Sketch to Floor Plan Pix2Pix",
53
+ description="Upload a sketch image and the model will generate a floor plan."
54
+ )
55
+
56
+ # Launch the Gradio interface when the script is run directly
57
+ if __name__ == "__main__":
58
+ iface.launch()