phenomenon1981 commited on
Commit
e982084
·
1 Parent(s): 4866f63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -1,6 +1,17 @@
1
  import gradio as gr
2
 
3
- model1 = gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
4
- model2 = gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
5
 
6
- gr.Interface(model1, model2).launch()
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ model1 = gr.Interface.load("https://huggingface.co/dreamlike-art/models/dreamlike-art/dreamlike-diffusion-1.0")
4
+ model2 = gr.Interface.load("https://huggingface.co/dreamlike-art/models/dreamlike-art/dreamlike-photoreal-2.0")
5
 
6
+ inputs = gr.inputs.Image(shape=(224, 224, 3), key="input_image")
7
+
8
+ def predict_model1(input_image):
9
+ return model1.predict(input_image)
10
+
11
+ def predict_model2(input_image):
12
+ return model2.predict(input_image)
13
+
14
+ outputs = [gr.outputs.Image(shape=(224, 224, 3), key="model_1_output"),
15
+ gr.outputs.Image(shape=(224, 224, 3), key="model_2_output")]
16
+
17
+ gr.Interface(predict_model1, inputs, outputs, title="Dreamlike Models").launch()