oValach commited on
Commit
2011d11
·
verified ·
1 Parent(s): 6af76da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -7
app.py CHANGED
@@ -1,12 +1,26 @@
1
  import gradio as gr
 
 
2
 
3
- def greet(name, intensity):
4
- return "Hello, " + name + "!" * int(intensity)
 
 
5
 
6
- demo = gr.Interface(
7
- fn=greet,
8
- inputs=["text", "slider"],
9
- outputs=["text"],
 
 
 
 
 
 
 
 
10
  )
11
 
12
- demo.launch()
 
 
 
1
  import gradio as gr
2
+ from PIL import Image
3
+ from TheDistanceAccessor import run
4
 
5
+ # Assuming your function looks something like this:
6
+ # def process_image(input_image: Image.Image) -> Image.Image:
7
+ # # Your image processing logic here
8
+ # return output_image
9
 
10
+ def process_image(input_image):
11
+ # Your image processing code here
12
+ output_image = input_image # Placeholder for your actual processing logic
13
+ return output_image
14
+
15
+ # Create the Gradio interface
16
+ iface = gr.Interface(
17
+ fn=process_image, # The function to be called
18
+ inputs=gr.inputs.Image(type="pil"), # Input type
19
+ outputs=gr.outputs.Image(type="pil"), # Output type
20
+ title="Image Processor", # Title of the interface
21
+ description="Upload an image and get a processed image as output." # Description of the interface
22
  )
23
 
24
+ # Launch the interface
25
+ if __name__ == "__main__":
26
+ iface.launch()