mushafdev commited on
Commit
c8f9024
·
verified ·
1 Parent(s): 18a3a8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,4 +1,4 @@
1
- """import gradio as gr
2
  import os
3
  from huggingface_hub import InferenceClient
4
  from PIL import Image
@@ -36,9 +36,9 @@ gr.Interface(
36
  outputs=gr.Image(label="Redesigned Room"),
37
  title="AI Room Redesign (No Local Model)",
38
  description="Upload a room image and redesign it using prompts"
39
- ).launch()"""
40
 
41
- import gradio as gr
42
  from PIL import Image
43
  from diffusers import StableDiffusionImg2ImgPipeline
44
  import torch
@@ -55,7 +55,7 @@ def redesign_room(image, style, colors, lighting, strength):
55
  # Resize for CPU
56
  image = image.convert("RGB").resize((512, 512))
57
 
58
- prompt = f"""
59
  Redesign this room with photorealistic style.
60
  Preserve all existing walls, windows, doors, and furniture layout.
61
  Interior style: {style}
@@ -63,7 +63,7 @@ Color palette: {colors}
63
  Lighting: {lighting}
64
  No distortions, no extra windows, no unrealistic objects.
65
  High-quality render with realistic shadows.
66
- """
67
 
68
  negative_prompt = "change room layout, move furniture, add windows, distort walls, cartoon"
69
 
@@ -91,5 +91,5 @@ with gr.Blocks() as demo:
91
  btn = gr.Button("Redesign Room")
92
  btn.click(redesign_room, [image_input, style, colors, lighting, strength], output)
93
 
94
- demo.launch()
95
 
 
1
+ import gradio as gr
2
  import os
3
  from huggingface_hub import InferenceClient
4
  from PIL import Image
 
36
  outputs=gr.Image(label="Redesigned Room"),
37
  title="AI Room Redesign (No Local Model)",
38
  description="Upload a room image and redesign it using prompts"
39
+ ).launch()
40
 
41
+ """"import gradio as gr
42
  from PIL import Image
43
  from diffusers import StableDiffusionImg2ImgPipeline
44
  import torch
 
55
  # Resize for CPU
56
  image = image.convert("RGB").resize((512, 512))
57
 
58
+ prompt = f"
59
  Redesign this room with photorealistic style.
60
  Preserve all existing walls, windows, doors, and furniture layout.
61
  Interior style: {style}
 
63
  Lighting: {lighting}
64
  No distortions, no extra windows, no unrealistic objects.
65
  High-quality render with realistic shadows.
66
+ "
67
 
68
  negative_prompt = "change room layout, move furniture, add windows, distort walls, cartoon"
69
 
 
91
  btn = gr.Button("Redesign Room")
92
  btn.click(redesign_room, [image_input, style, colors, lighting, strength], output)
93
 
94
+ demo.launch()"""
95