Commit
·
fa60735
1
Parent(s):
86d8841
29. Sept. 2024, 19:43
Browse files- _res/_custom.js +3 -0
- app.py +1 -0
_res/_custom.js
CHANGED
|
@@ -167,18 +167,21 @@ function gradioCustomJS() {
|
|
| 167 |
gradioContainer.classList.add("blur-container")
|
| 168 |
body.style.setProperty("--blur-value", "12px")
|
| 169 |
gradioApp.style.height = "calc(100vh - 120px)"
|
|
|
|
| 170 |
alertModalElem.style.display = ""
|
| 171 |
alertModalElemSpan.textContent = "Diese Seite ist nicht für mobile Geräte optimiert. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
| 172 |
} else if (window.innerWidth < 1024) {
|
| 173 |
gradioContainer.classList.add("blur-container")
|
| 174 |
body.style.setProperty("--blur-value", "12px")
|
| 175 |
gradioApp.style.height = "calc(100vh - 120px)"
|
|
|
|
| 176 |
alertModalElem.style.display = ""
|
| 177 |
alertModalElemSpan.textContent = "Bildschirm Auflösung oder Fensterbreite zu gering. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
| 178 |
} else {
|
| 179 |
gradioContainer.classList.remove("blur-container")
|
| 180 |
body.style.setProperty("--blur-value", "0px")
|
| 181 |
gradioApp.style.height = ""
|
|
|
|
| 182 |
alertModalElem.style.display = "none"
|
| 183 |
alertModalElemSpan.textContent = ""
|
| 184 |
}
|
|
|
|
| 167 |
gradioContainer.classList.add("blur-container")
|
| 168 |
body.style.setProperty("--blur-value", "12px")
|
| 169 |
gradioApp.style.height = "calc(100vh - 120px)"
|
| 170 |
+
resolutionModalWrapper.style.display = "none"
|
| 171 |
alertModalElem.style.display = ""
|
| 172 |
alertModalElemSpan.textContent = "Diese Seite ist nicht für mobile Geräte optimiert. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
| 173 |
} else if (window.innerWidth < 1024) {
|
| 174 |
gradioContainer.classList.add("blur-container")
|
| 175 |
body.style.setProperty("--blur-value", "12px")
|
| 176 |
gradioApp.style.height = "calc(100vh - 120px)"
|
| 177 |
+
resolutionModalWrapper.style.display = "none"
|
| 178 |
alertModalElem.style.display = ""
|
| 179 |
alertModalElemSpan.textContent = "Bildschirm Auflösung oder Fensterbreite zu gering. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
| 180 |
} else {
|
| 181 |
gradioContainer.classList.remove("blur-container")
|
| 182 |
body.style.setProperty("--blur-value", "0px")
|
| 183 |
gradioApp.style.height = ""
|
| 184 |
+
resolutionModalWrapper.style.display = "none"
|
| 185 |
alertModalElem.style.display = "none"
|
| 186 |
alertModalElemSpan.textContent = ""
|
| 187 |
}
|
app.py
CHANGED
|
@@ -311,6 +311,7 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
|
|
| 311 |
<p>Erstelle "Control Images" für Stable Diffusion und andere Tools die ControlNet verwenden.<br/>
|
| 312 |
Diese Demo läuft nur auf CPU, eine Inference wird daher sehr lange dauern. Du kannst diesen Space clonen und lokal auf deinem Computer verwenden.</p>
|
| 313 |
<p><i class="winking-hand-emoji"></i> Sebastian, gib dem Space gerne ein <i class="heart-beat-emoji"></i></p>
|
|
|
|
| 314 |
""",
|
| 315 |
elem_classes="md-header",
|
| 316 |
)
|
|
|
|
| 311 |
<p>Erstelle "Control Images" für Stable Diffusion und andere Tools die ControlNet verwenden.<br/>
|
| 312 |
Diese Demo läuft nur auf CPU, eine Inference wird daher sehr lange dauern. Du kannst diesen Space clonen und lokal auf deinem Computer verwenden.</p>
|
| 313 |
<p><i class="winking-hand-emoji"></i> Sebastian, gib dem Space gerne ein <i class="heart-beat-emoji"></i></p>
|
| 314 |
+
<div id="resolution_modal_wrapper" class="resolution-modal-wrapper"></div>
|
| 315 |
""",
|
| 316 |
elem_classes="md-header",
|
| 317 |
)
|