Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,126 +12,8 @@ def infer(prompt):
|
|
| 12 |
images = pipe([prompt] * num_samples, guidance_scale=7.5)["sample"]
|
| 13 |
return images
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
font-family: 'IBM Plex Sans', sans-serif;
|
| 18 |
-
}
|
| 19 |
-
.gr-button {
|
| 20 |
-
color: white;
|
| 21 |
-
border-color: black;
|
| 22 |
-
background: black;
|
| 23 |
-
}
|
| 24 |
-
input[type='range'] {
|
| 25 |
-
accent-color: black;
|
| 26 |
-
}
|
| 27 |
-
.dark input[type='range'] {
|
| 28 |
-
accent-color: #dfdfdf;
|
| 29 |
-
}
|
| 30 |
-
.container {
|
| 31 |
-
max-width: 730px;
|
| 32 |
-
margin: auto;
|
| 33 |
-
padding-top: 1.5rem;
|
| 34 |
-
}
|
| 35 |
-
#gallery {
|
| 36 |
-
min-height: 22rem;
|
| 37 |
-
margin-bottom: 15px;
|
| 38 |
-
margin-left: auto;
|
| 39 |
-
margin-right: auto;
|
| 40 |
-
border-bottom-right-radius: .5rem !important;
|
| 41 |
-
border-bottom-left-radius: .5rem !important;
|
| 42 |
-
}
|
| 43 |
-
#gallery>div>.h-full {
|
| 44 |
-
min-height: 20rem;
|
| 45 |
-
}
|
| 46 |
-
.details:hover {
|
| 47 |
-
text-decoration: underline;
|
| 48 |
-
}
|
| 49 |
-
.gr-button {
|
| 50 |
-
white-space: nowrap;
|
| 51 |
-
}
|
| 52 |
-
.gr-button:focus {
|
| 53 |
-
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
| 54 |
-
outline: none;
|
| 55 |
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
| 56 |
-
--tw-border-opacity: 1;
|
| 57 |
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
| 58 |
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
| 59 |
-
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
| 60 |
-
--tw-ring-opacity: .5;
|
| 61 |
-
}
|
| 62 |
-
#advanced-btn {
|
| 63 |
-
font-size: .7rem !important;
|
| 64 |
-
line-height: 19px;
|
| 65 |
-
margin-top: 12px;
|
| 66 |
-
margin-bottom: 12px;
|
| 67 |
-
padding: 2px 8px;
|
| 68 |
-
border-radius: 14px !important;
|
| 69 |
-
}
|
| 70 |
-
#advanced-options {
|
| 71 |
-
display: none;
|
| 72 |
-
margin-bottom: 20px;
|
| 73 |
-
}
|
| 74 |
-
.footer {
|
| 75 |
-
margin-bottom: 45px;
|
| 76 |
-
margin-top: 35px;
|
| 77 |
-
text-align: center;
|
| 78 |
-
border-bottom: 1px solid #e5e5e5;
|
| 79 |
-
}
|
| 80 |
-
.footer>p {
|
| 81 |
-
font-size: .8rem;
|
| 82 |
-
display: inline-block;
|
| 83 |
-
padding: 0 10px;
|
| 84 |
-
transform: translateY(10px);
|
| 85 |
-
background: white;
|
| 86 |
-
}
|
| 87 |
-
.dark .footer {
|
| 88 |
-
border-color: #303030;
|
| 89 |
-
}
|
| 90 |
-
.dark .footer>p {
|
| 91 |
-
background: #0b0f19;
|
| 92 |
-
}
|
| 93 |
-
.acknowledgments h4{
|
| 94 |
-
margin: 1.25em 0 .25em 0;
|
| 95 |
-
font-weight: bold;
|
| 96 |
-
font-size: 115%;
|
| 97 |
-
}
|
| 98 |
-
#container-advanced-btns{
|
| 99 |
-
display: flex;
|
| 100 |
-
flex-wrap: wrap;
|
| 101 |
-
justify-content: space-between;
|
| 102 |
-
align-items: center;
|
| 103 |
-
}
|
| 104 |
-
.animate-spin {
|
| 105 |
-
animation: spin 1s linear infinite;
|
| 106 |
-
}
|
| 107 |
-
@keyframes spin {
|
| 108 |
-
from {
|
| 109 |
-
transform: rotate(0deg);
|
| 110 |
-
}
|
| 111 |
-
to {
|
| 112 |
-
transform: rotate(360deg);
|
| 113 |
-
}
|
| 114 |
-
}
|
| 115 |
-
#share-btn-container {
|
| 116 |
-
display: flex; padding-left: 0.5rem !important; padding-right: 0.5rem !important; background-color: #000000; justify-content: center; align-items: center; border-radius: 9999px !important; width: 13rem;
|
| 117 |
-
}
|
| 118 |
-
#share-btn {
|
| 119 |
-
all: initial; color: #ffffff;font-weight: 600; cursor:pointer; font-family: 'IBM Plex Sans', sans-serif; margin-left: 0.5rem !important; padding-top: 0.25rem !important; padding-bottom: 0.25rem !important;
|
| 120 |
-
}
|
| 121 |
-
#share-btn * {
|
| 122 |
-
all: unset;
|
| 123 |
-
}
|
| 124 |
-
.gr-form{
|
| 125 |
-
flex: 1 1 50%; border-top-right-radius: 0; border-bottom-right-radius: 0;
|
| 126 |
-
}
|
| 127 |
-
#prompt-container{
|
| 128 |
-
gap: 0;
|
| 129 |
-
}
|
| 130 |
-
#generated_id{
|
| 131 |
-
min-height: 700px
|
| 132 |
-
}
|
| 133 |
-
"""
|
| 134 |
-
block = gr.Blocks(css=css)
|
| 135 |
|
| 136 |
examples = [
|
| 137 |
[
|
|
|
|
| 12 |
images = pipe([prompt] * num_samples, guidance_scale=7.5)["sample"]
|
| 13 |
return images
|
| 14 |
|
| 15 |
+
|
| 16 |
+
block = gr.Blocks()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
examples = [
|
| 19 |
[
|