Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -277,7 +277,15 @@ client = AIVisionSystem(
|
|
277 |
)
|
278 |
|
279 |
# Create Gradio interface
|
280 |
-
with gr.Blocks(css=custom_css, title="AI 智慧回收站:次世代垃圾分類系統", theme=gr.themes.Soft()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
# Title area
|
282 |
gr.HTML("""
|
283 |
<div class="main-header">
|
|
|
277 |
)
|
278 |
|
279 |
# Create Gradio interface
|
280 |
+
with gr.Blocks(css=custom_css, title="AI 智慧回收站:次世代垃圾分類系統", theme=gr.themes.Soft(), js="""
|
281 |
+
function refresh() {
|
282 |
+
const url = new URL(window.location);
|
283 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
284 |
+
url.searchParams.set('__theme', 'dark');
|
285 |
+
window.location.href = url.href;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
""") as app:
|
289 |
# Title area
|
290 |
gr.HTML("""
|
291 |
<div class="main-header">
|