Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,103 +103,14 @@ def update_server_status():
|
|
| 103 |
|
| 104 |
|
| 105 |
css = """
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
line-height: 1.6;
|
| 109 |
-
color: #333;
|
| 110 |
-
margin: 0 auto;
|
| 111 |
-
padding: 20px;
|
| 112 |
}
|
|
|
|
| 113 |
|
| 114 |
|
| 115 |
-
.
|
| 116 |
-
display: flex;
|
| 117 |
-
flex-direction: column;
|
| 118 |
-
gap: 10px;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
-
.row {
|
| 122 |
-
display: flex;
|
| 123 |
-
flex-wrap: wrap;
|
| 124 |
-
gap: 10px;
|
| 125 |
-
}
|
| 126 |
|
| 127 |
-
.column {
|
| 128 |
-
flex: 1;
|
| 129 |
-
min-width: 0;
|
| 130 |
-
}
|
| 131 |
-
|
| 132 |
-
.video-output {
|
| 133 |
-
width: 100%;
|
| 134 |
-
max-width: 720px;
|
| 135 |
-
height: auto;
|
| 136 |
-
margin: 0 auto;
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
.server-status {
|
| 140 |
-
margin-top: 5px;
|
| 141 |
-
padding: 5px;
|
| 142 |
-
font-size: 0.8em;
|
| 143 |
-
}
|
| 144 |
-
.server-status h4 {
|
| 145 |
-
margin: 0 0 3px 0;
|
| 146 |
-
font-size: 0.9em;
|
| 147 |
-
}
|
| 148 |
-
.server-status .row {
|
| 149 |
-
margin-bottom: 2px;
|
| 150 |
-
}
|
| 151 |
-
.server-status .textbox {
|
| 152 |
-
min-height: unset !important;
|
| 153 |
-
}
|
| 154 |
-
.server-status .textbox input {
|
| 155 |
-
padding: 1px 5px !important;
|
| 156 |
-
height: 20px !important;
|
| 157 |
-
font-size: 0.9em !important;
|
| 158 |
-
}
|
| 159 |
-
.server-status .textbox label {
|
| 160 |
-
margin-bottom: 0 !important;
|
| 161 |
-
font-size: 0.9em !important;
|
| 162 |
-
line-height: 1.2 !important;
|
| 163 |
-
}
|
| 164 |
-
.server-status .textbox {
|
| 165 |
-
gap: 0 !important;
|
| 166 |
-
}
|
| 167 |
-
.server-status .textbox input {
|
| 168 |
-
margin-top: -2px !important;
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
@media (max-width: 768px) {
|
| 172 |
-
.row {
|
| 173 |
-
flex-direction: column;
|
| 174 |
-
}
|
| 175 |
-
.column {
|
| 176 |
-
width: 100%;
|
| 177 |
-
}
|
| 178 |
-
}
|
| 179 |
-
.video-output {
|
| 180 |
-
width: 100%;
|
| 181 |
-
height: auto;
|
| 182 |
-
}
|
| 183 |
-
}
|
| 184 |
-
"""
|
| 185 |
-
|
| 186 |
-
with gr.Blocks(css=css) as demo:
|
| 187 |
-
gr.HTML(
|
| 188 |
-
"""
|
| 189 |
-
<div style="text-align: center; font-size: 32px; font-weight: bold; margin-bottom: 20px;">
|
| 190 |
-
VideoSys for CogVideoX🤗
|
| 191 |
-
</div>
|
| 192 |
-
<div style="text-align: center; font-size: 15px;">
|
| 193 |
-
🌐 Github: <a href="https://github.com/NUS-HPC-AI-Lab/VideoSys">https://github.com/NUS-HPC-AI-Lab/VideoSys</a><br>
|
| 194 |
-
|
| 195 |
-
⚠️ This demo is for academic research and experiential use only.
|
| 196 |
-
Users should strictly adhere to local laws and ethics.<br>
|
| 197 |
-
|
| 198 |
-
💡 This demo only demonstrates single-device inference. To experience the full power of VideoSys, please deploy it with multiple devices.<br><br>
|
| 199 |
-
</div>
|
| 200 |
-
</div>
|
| 201 |
-
"""
|
| 202 |
-
)
|
| 203 |
|
| 204 |
with gr.Row():
|
| 205 |
with gr.Column():
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
css = """
|
| 106 |
+
footer {
|
| 107 |
+
visibility: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
+
"""
|
| 110 |
|
| 111 |
|
| 112 |
+
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
with gr.Row():
|
| 116 |
with gr.Column():
|