abdullahalioo commited on
Commit
d636540
·
verified ·
1 Parent(s): fe8a874

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # Load the ZenCtrl tool pipeline for image enhancement
5
+ enhancer = pipeline(model="fotographerai/zenctrl_tools")
6
+
7
+ def enhance_image(input_image):
8
+ # Enhance the image using the model
9
+ enhanced_image = enhancer(input_image)
10
+ return enhanced_image
11
+
12
+ # Set up the Gradio interface
13
+ interface = gr.Interface(
14
+ fn=enhance_image,
15
+ inputs=gr.Image(type="pil", label="Upload Image to Enhance"),
16
+ outputs=gr.Image(type="pil", label="Enhanced Image"),
17
+ title="Image Enhancement with ZenCtrl",
18
+ description="Upload an image to enhance it using FotographerAI's ZenCtrl tools. Enhance your photos with AI!",
19
+ live=True
20
+ )
21
+
22
+ # Launch the interface
23
+ interface.launch()