Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -71,15 +71,15 @@ def generate_random_string(length):
|
|
71 |
characters = string.ascii_letters + string.digits
|
72 |
return ''.join(random.choice(characters) for _ in range(length))
|
73 |
|
74 |
-
@spaces.GPU(duration=
|
75 |
def Piper(_do,_dont):
|
76 |
return pipe(
|
77 |
_do,
|
78 |
-
height=
|
79 |
-
width=
|
80 |
negative_prompt=_dont,
|
81 |
num_inference_steps=400,
|
82 |
-
guidance_scale=9
|
83 |
)
|
84 |
|
85 |
def infer(prompt,prompt2):
|
@@ -103,7 +103,7 @@ css="""
|
|
103 |
max-width: 15cm;
|
104 |
}
|
105 |
#image-container {
|
106 |
-
aspect-ratio:
|
107 |
}
|
108 |
.dropdown-arrow {
|
109 |
display: none !important;
|
@@ -112,8 +112,8 @@ css="""
|
|
112 |
|
113 |
js="""
|
114 |
function custom(){
|
115 |
-
document.querySelector("div#prompt input").setAttribute("maxlength","
|
116 |
-
document.querySelector("div#prompt2 input").setAttribute("maxlength","
|
117 |
}
|
118 |
"""
|
119 |
|
|
|
71 |
characters = string.ascii_letters + string.digits
|
72 |
return ''.join(random.choice(characters) for _ in range(length))
|
73 |
|
74 |
+
@spaces.GPU(duration=100)
|
75 |
def Piper(_do,_dont):
|
76 |
return pipe(
|
77 |
_do,
|
78 |
+
height=528,
|
79 |
+
width=704,
|
80 |
negative_prompt=_dont,
|
81 |
num_inference_steps=400,
|
82 |
+
guidance_scale=9
|
83 |
)
|
84 |
|
85 |
def infer(prompt,prompt2):
|
|
|
103 |
max-width: 15cm;
|
104 |
}
|
105 |
#image-container {
|
106 |
+
aspect-ratio: 4 / 3;
|
107 |
}
|
108 |
.dropdown-arrow {
|
109 |
display: none !important;
|
|
|
112 |
|
113 |
js="""
|
114 |
function custom(){
|
115 |
+
document.querySelector("div#prompt input").setAttribute("maxlength","35");
|
116 |
+
document.querySelector("div#prompt2 input").setAttribute("maxlength","15");
|
117 |
}
|
118 |
"""
|
119 |
|