apolinario
commited on
Commit
•
199e379
1
Parent(s):
2eb58d1
Fix some issues
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from turtle import width
|
2 |
import gradio as gr
|
|
|
3 |
import inspect
|
4 |
latent = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
5 |
rudalle = gr.Interface.load("spaces/multimodalart/rudalle")
|
@@ -7,20 +8,17 @@ guided = gr.Interface.load("spaces/EleutherAI/clip-guided-diffusion")
|
|
7 |
print(guided)
|
8 |
def text2image_latent(text,steps,width,height,images,diversity):
|
9 |
image = latent(text, steps, width, height, images, diversity)[0]
|
10 |
-
print(image)
|
11 |
return(image)
|
12 |
-
|
13 |
-
|
14 |
def text2image_rudalle(text,aspect,model):
|
15 |
-
image = rudalle(text,aspect,model)
|
16 |
print(image)
|
17 |
return(image)
|
18 |
|
19 |
def text2image_guided(text):
|
20 |
-
image = guided(text)[0]
|
21 |
return(image)
|
22 |
|
23 |
-
|
24 |
block = gr.Blocks()
|
25 |
|
26 |
with block:
|
|
|
1 |
from turtle import width
|
2 |
import gradio as gr
|
3 |
+
import random
|
4 |
import inspect
|
5 |
latent = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
6 |
rudalle = gr.Interface.load("spaces/multimodalart/rudalle")
|
|
|
8 |
print(guided)
|
9 |
def text2image_latent(text,steps,width,height,images,diversity):
|
10 |
image = latent(text, steps, width, height, images, diversity)[0]
|
|
|
11 |
return(image)
|
12 |
+
|
|
|
13 |
def text2image_rudalle(text,aspect,model):
|
14 |
+
image = rudalle(text,aspect,model)[0]
|
15 |
print(image)
|
16 |
return(image)
|
17 |
|
18 |
def text2image_guided(text):
|
19 |
+
image = guided(text,None,10,600,0,0,0,random.randint(2147483647),None,50,32)[0]
|
20 |
return(image)
|
21 |
|
|
|
22 |
block = gr.Blocks()
|
23 |
|
24 |
with block:
|