Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from
|
| 3 |
|
| 4 |
-
# Load the ZenCtrl
|
| 5 |
-
|
| 6 |
|
| 7 |
-
def
|
| 8 |
# Enhance the image using the model
|
| 9 |
-
enhanced_image =
|
| 10 |
return enhanced_image
|
| 11 |
|
| 12 |
# Set up the Gradio interface
|
| 13 |
interface = gr.Interface(
|
| 14 |
-
fn=
|
| 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",
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from diffusion_single_file import load_model, enhance_image
|
| 3 |
|
| 4 |
+
# Load the ZenCtrl model using the correct library
|
| 5 |
+
model = load_model("fotographerai/zenctrl_tools")
|
| 6 |
|
| 7 |
+
def enhance_image_fn(input_image):
|
| 8 |
# Enhance the image using the model
|
| 9 |
+
enhanced_image = enhance_image(model, input_image)
|
| 10 |
return enhanced_image
|
| 11 |
|
| 12 |
# Set up the Gradio interface
|
| 13 |
interface = gr.Interface(
|
| 14 |
+
fn=enhance_image_fn,
|
| 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",
|