Spaces:
Paused
Paused
Readd previous HUD graphic
Browse files
app.py
CHANGED
|
@@ -35,41 +35,34 @@ model = QwenVLAPIModel(
|
|
| 35 |
|
| 36 |
|
| 37 |
custom_css = """
|
| 38 |
-
/* Your existing CSS */
|
| 39 |
-
.sandbox-outer-wrapper {
|
| 40 |
-
display: flex;
|
| 41 |
-
justify-content: center;
|
| 42 |
-
width: 100%;
|
| 43 |
-
padding: 20px 0;
|
| 44 |
-
overflow: hidden;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
.sandbox-container {
|
| 48 |
position: relative;
|
| 49 |
-
width:
|
| 50 |
-
height:
|
| 51 |
overflow: hidden;
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
.sandbox-background {
|
| 55 |
position: absolute;
|
| 56 |
top: 0;
|
| 57 |
left: 0;
|
| 58 |
-
width:
|
| 59 |
-
height:
|
| 60 |
}
|
| 61 |
|
| 62 |
.sandbox-iframe {
|
| 63 |
position: absolute;
|
| 64 |
-
top:
|
| 65 |
-
left:
|
| 66 |
width: <<WIDTH>>px;
|
| 67 |
height: <<HEIGHT>>px;
|
| 68 |
border: 4px solid #444444;
|
| 69 |
transform-origin: 0 0;
|
| 70 |
-
transform: scale(0.
|
| 71 |
}
|
| 72 |
|
|
|
|
| 73 |
.primary-color-label label span {
|
| 74 |
font-weight: bold;
|
| 75 |
color: var(--button-primary-border-color);
|
|
@@ -78,8 +71,8 @@ custom_css = """
|
|
| 78 |
/* Status indicator light */
|
| 79 |
.status-indicator {
|
| 80 |
position: absolute;
|
| 81 |
-
|
| 82 |
-
left:
|
| 83 |
width: 20px;
|
| 84 |
height: 20px;
|
| 85 |
border-radius: 50%;
|
|
@@ -89,13 +82,14 @@ custom_css = """
|
|
| 89 |
|
| 90 |
.status-text {
|
| 91 |
position: absolute;
|
| 92 |
-
|
| 93 |
-
left:
|
|
|
|
| 94 |
font-size: 16px;
|
| 95 |
font-weight: bold;
|
| 96 |
color: black;
|
| 97 |
background-color: white;
|
| 98 |
-
padding:
|
| 99 |
border-radius: 3px;
|
| 100 |
border: 2px solid black;
|
| 101 |
text-shadow: none;
|
|
@@ -165,24 +159,22 @@ footer_html="""
|
|
| 165 |
</div>
|
| 166 |
"""
|
| 167 |
sandbox_html_template = """
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
</div>
|
| 185 |
-
</div>
|
| 186 |
""".replace("<<WIDTH>>", str(WIDTH+15)).replace("<<HEIGHT>>", str(HEIGHT+10))
|
| 187 |
|
| 188 |
custom_js = """
|
|
|
|
| 35 |
|
| 36 |
|
| 37 |
custom_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
.sandbox-container {
|
| 39 |
position: relative;
|
| 40 |
+
width: 910px;
|
| 41 |
+
height: 713px;
|
| 42 |
overflow: hidden;
|
| 43 |
+
margin: auto;
|
| 44 |
}
|
| 45 |
|
| 46 |
.sandbox-background {
|
| 47 |
position: absolute;
|
| 48 |
top: 0;
|
| 49 |
left: 0;
|
| 50 |
+
width: 910px;
|
| 51 |
+
height: 713px;
|
| 52 |
}
|
| 53 |
|
| 54 |
.sandbox-iframe {
|
| 55 |
position: absolute;
|
| 56 |
+
top: 8%;
|
| 57 |
+
left: 7%;
|
| 58 |
width: <<WIDTH>>px;
|
| 59 |
height: <<HEIGHT>>px;
|
| 60 |
border: 4px solid #444444;
|
| 61 |
transform-origin: 0 0;
|
| 62 |
+
transform: scale(0.605);
|
| 63 |
}
|
| 64 |
|
| 65 |
+
/* Colored label for task textbox */
|
| 66 |
.primary-color-label label span {
|
| 67 |
font-weight: bold;
|
| 68 |
color: var(--button-primary-border-color);
|
|
|
|
| 71 |
/* Status indicator light */
|
| 72 |
.status-indicator {
|
| 73 |
position: absolute;
|
| 74 |
+
bottom: 4%;
|
| 75 |
+
left: 43%;
|
| 76 |
width: 20px;
|
| 77 |
height: 20px;
|
| 78 |
border-radius: 50%;
|
|
|
|
| 82 |
|
| 83 |
.status-text {
|
| 84 |
position: absolute;
|
| 85 |
+
bottom: 3.8%;
|
| 86 |
+
left: 47%;
|
| 87 |
+
right:40%
|
| 88 |
font-size: 16px;
|
| 89 |
font-weight: bold;
|
| 90 |
color: black;
|
| 91 |
background-color: white;
|
| 92 |
+
padding: 0 10px;
|
| 93 |
border-radius: 3px;
|
| 94 |
border: 2px solid black;
|
| 95 |
text-shadow: none;
|
|
|
|
| 159 |
</div>
|
| 160 |
"""
|
| 161 |
sandbox_html_template = """
|
| 162 |
+
<div class="sandbox-container">
|
| 163 |
+
<img src="https://huggingface.co/datasets/m-ric/images/resolve/main/HUD_leandro.png" class="sandbox-background" />
|
| 164 |
+
<div class="status-text">{status_text}</div>
|
| 165 |
+
<div class="status-indicator {status_class}"></div>
|
| 166 |
+
<iframe id="sandbox-iframe"
|
| 167 |
+
src="{stream_url}"
|
| 168 |
+
class="sandbox-iframe"
|
| 169 |
+
style="display: block;"
|
| 170 |
+
allowfullscreen>
|
| 171 |
+
</iframe>
|
| 172 |
+
<img id="bsod-image"
|
| 173 |
+
src="https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/blue_screen_of_death.gif"
|
| 174 |
+
class="bsod-image"
|
| 175 |
+
style="display: none; position: absolute; top: 13%; left: 5%; width: <<WIDTH>>px; height: <<HEIGHT>>px; border: 4px solid #444444;"
|
| 176 |
+
/>
|
| 177 |
+
</div>
|
|
|
|
|
|
|
| 178 |
""".replace("<<WIDTH>>", str(WIDTH+15)).replace("<<HEIGHT>>", str(HEIGHT+10))
|
| 179 |
|
| 180 |
custom_js = """
|