LN1996 commited on
Commit
a65d535
1 Parent(s): 117c418

Create app_test.py

Browse files
Files changed (1) hide show
  1. app_test.py +25 -0
app_test.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def casa_ai_run(image=None, text=None):
2
+
3
+ if image is None and text is None:
4
+ print('Please provide context in form of image, audio, text')
5
+ return None
6
+
7
+ result_image = controlnetdesign.generate_design(image, text)
8
+ return result_image
9
+
10
+ import gradio as gr
11
+
12
+ title = "CasaAI Demo"
13
+ description = "A simple Gradio interface to use CasaAI for virtual staging"
14
+
15
+ demo = gr.Interface(casa_ai_run,
16
+ inputs = [gr.Image(label="Empty room image", type='pil'),
17
+ gr.Textbox(label="Prompt to design room"),
18
+ ],
19
+ outputs = [
20
+ gr.Image(label="Generated room image"),
21
+ ],
22
+ title = title,
23
+ description = description,
24
+ )
25
+ demo.launch()