File size: 425 Bytes
4c77626
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

def replace_background(image, prompt):
    # Placeholder function – returns the same image for now
    return image

demo = gr.Interface(
    fn=replace_background,
    inputs=[
        gr.Image(type="pil", label="Upload an Image"),
        gr.Textbox(label="Describe New Background")
    ],
    outputs=gr.Image(type="pil", label="Modified Image"),
    title="AI Background Replacer"
)

demo.launch()