Spaces:
Running
Running
Upload app_en.py
Browse files
app_en.py
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
#!/usr/bin/env python3
|
2 |
# -*- coding: utf-8 -*-
|
3 |
"""
|
4 |
-
TRELLIS
|
5 |
-
|
6 |
"""
|
7 |
|
8 |
import gradio as gr
|
9 |
|
10 |
-
|
11 |
def create_notice_interface():
|
12 |
-
"""
|
13 |
|
14 |
-
#
|
15 |
custom_css = """
|
16 |
.notice-container {
|
17 |
background-color: #3B82F6;
|
@@ -22,23 +21,27 @@ def create_notice_interface():
|
|
22 |
margin: 2rem auto;
|
23 |
max-width: 600px;
|
24 |
}
|
|
|
25 |
.notice-title {
|
26 |
color: #fff;
|
27 |
font-size: 1.8rem;
|
28 |
font-weight: 700;
|
29 |
margin-bottom: 0.6rem;
|
30 |
}
|
|
|
31 |
.notice-subtitle {
|
32 |
color: #f0f0f0;
|
33 |
font-size: 1rem;
|
34 |
line-height: 1.6;
|
35 |
margin-bottom: 1.5rem;
|
36 |
}
|
|
|
37 |
.maintenance-icon {
|
38 |
font-size: 2.5rem;
|
39 |
margin-bottom: 0.5rem;
|
40 |
display: block;
|
41 |
}
|
|
|
42 |
.redirect-button, .redirect-button-blue {
|
43 |
background-color: #2563EB;
|
44 |
color: white;
|
@@ -50,11 +53,13 @@ def create_notice_interface():
|
|
50 |
cursor: pointer;
|
51 |
text-decoration: none;
|
52 |
display: inline-block;
|
53 |
-
margin: 0.5rem
|
54 |
}
|
|
|
55 |
.redirect-button:hover, .redirect-button-blue:hover {
|
56 |
background-color: #1D4ED8;
|
57 |
}
|
|
|
58 |
.status-card {
|
59 |
background: #ffffff;
|
60 |
border-radius: 12px;
|
@@ -63,16 +68,19 @@ def create_notice_interface():
|
|
63 |
max-width: 700px;
|
64 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
65 |
}
|
|
|
66 |
.status-text {
|
67 |
color: #333;
|
68 |
font-size: 1rem;
|
69 |
line-height: 1.6;
|
70 |
margin-bottom: 1rem;
|
71 |
}
|
|
|
72 |
.highlight-text {
|
73 |
color: #2563EB;
|
74 |
font-weight: bold;
|
75 |
}
|
|
|
76 |
.footer-text {
|
77 |
color: #888;
|
78 |
font-size: 0.85rem;
|
@@ -81,15 +89,12 @@ def create_notice_interface():
|
|
81 |
}
|
82 |
"""
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
) as demo:
|
89 |
|
90 |
-
|
91 |
-
gr.HTML(
|
92 |
-
"""
|
93 |
<div class="notice-container">
|
94 |
<div class="maintenance-icon">🔧</div>
|
95 |
<h1 class="notice-title">Service Under Maintenance</h1>
|
@@ -99,72 +104,49 @@ def create_notice_interface():
|
|
99 |
</p>
|
100 |
<a href="https://image-to-3d.wingetgui.com/" target="_blank"
|
101 |
class="redirect-button">
|
102 |
-
|
103 |
-
</a>
|
104 |
-
<a href="https://partpacker.wingetgui.com/" target="_blank"
|
105 |
-
class="redirect-button-blue">
|
106 |
-
Partpacker (Recommended)
|
107 |
-
</a>
|
108 |
-
<a href="https://imageto3d-hunyuan2.wingetgui.com/" target="_blank"
|
109 |
-
class="redirect-button-blue">
|
110 |
-
Hunyuan3D 2.1
|
111 |
</a>
|
112 |
</div>
|
113 |
-
"""
|
114 |
-
)
|
115 |
|
116 |
-
|
117 |
-
gr.HTML(
|
118 |
-
"""
|
119 |
<div class="status-card">
|
120 |
<div class="status-text">
|
121 |
🚀 <span class="highlight-text">Good News!</span><br><br>
|
122 |
-
|
|
|
123 |
</div>
|
124 |
<div class="status-text">
|
125 |
✨ <strong>Key Features:</strong><br>
|
126 |
-
• 🖼️ Image
|
127 |
-
• ⚡ Fast processing,
|
128 |
• 🎨 High-quality output<br>
|
129 |
-
• 💻
|
130 |
</div>
|
131 |
<div style="text-align: center;">
|
132 |
<a href="https://image-to-3d.wingetgui.com/" target="_blank"
|
133 |
-
class="redirect-button">
|
134 |
-
Hunyuan3D 1.0 (no user GPU required)
|
135 |
-
</a>
|
136 |
-
<a href="https://partpacker.wingetgui.com/" target="_blank"
|
137 |
-
class="redirect-button-blue">
|
138 |
-
Partpacker (Recommended)
|
139 |
-
</a>
|
140 |
-
<a href="https://imageto3d-hunyuan2.wingetgui.com/" target="_blank"
|
141 |
class="redirect-button-blue">
|
142 |
-
|
143 |
</a>
|
144 |
</div>
|
145 |
</div>
|
146 |
-
"""
|
147 |
-
)
|
148 |
|
149 |
-
|
150 |
-
gr.HTML(
|
151 |
-
"""
|
152 |
<div class="footer-text">
|
153 |
-
Thank you for choosing TRELLIS
|
154 |
</div>
|
155 |
-
"""
|
156 |
-
)
|
157 |
|
158 |
return demo
|
159 |
|
160 |
|
161 |
if __name__ == "__main__":
|
162 |
-
# Start the Gradio application
|
163 |
app = create_notice_interface()
|
164 |
app.launch(
|
165 |
server_name="0.0.0.0",
|
166 |
server_port=7860,
|
167 |
share=False,
|
168 |
show_error=True,
|
169 |
-
quiet=False
|
170 |
)
|
|
|
1 |
#!/usr/bin/env python3
|
2 |
# -*- coding: utf-8 -*-
|
3 |
"""
|
4 |
+
TRELLIS 维护通知界面(正式版)
|
5 |
+
依赖:Python 3.8+、gradio 4.*
|
6 |
"""
|
7 |
|
8 |
import gradio as gr
|
9 |
|
|
|
10 |
def create_notice_interface():
|
11 |
+
"""创建维护通知界面"""
|
12 |
|
13 |
+
# 正式风格的 CSS(无动画)
|
14 |
custom_css = """
|
15 |
.notice-container {
|
16 |
background-color: #3B82F6;
|
|
|
21 |
margin: 2rem auto;
|
22 |
max-width: 600px;
|
23 |
}
|
24 |
+
|
25 |
.notice-title {
|
26 |
color: #fff;
|
27 |
font-size: 1.8rem;
|
28 |
font-weight: 700;
|
29 |
margin-bottom: 0.6rem;
|
30 |
}
|
31 |
+
|
32 |
.notice-subtitle {
|
33 |
color: #f0f0f0;
|
34 |
font-size: 1rem;
|
35 |
line-height: 1.6;
|
36 |
margin-bottom: 1.5rem;
|
37 |
}
|
38 |
+
|
39 |
.maintenance-icon {
|
40 |
font-size: 2.5rem;
|
41 |
margin-bottom: 0.5rem;
|
42 |
display: block;
|
43 |
}
|
44 |
+
|
45 |
.redirect-button, .redirect-button-blue {
|
46 |
background-color: #2563EB;
|
47 |
color: white;
|
|
|
53 |
cursor: pointer;
|
54 |
text-decoration: none;
|
55 |
display: inline-block;
|
56 |
+
margin: 0.5rem auto;
|
57 |
}
|
58 |
+
|
59 |
.redirect-button:hover, .redirect-button-blue:hover {
|
60 |
background-color: #1D4ED8;
|
61 |
}
|
62 |
+
|
63 |
.status-card {
|
64 |
background: #ffffff;
|
65 |
border-radius: 12px;
|
|
|
68 |
max-width: 700px;
|
69 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
70 |
}
|
71 |
+
|
72 |
.status-text {
|
73 |
color: #333;
|
74 |
font-size: 1rem;
|
75 |
line-height: 1.6;
|
76 |
margin-bottom: 1rem;
|
77 |
}
|
78 |
+
|
79 |
.highlight-text {
|
80 |
color: #2563EB;
|
81 |
font-weight: bold;
|
82 |
}
|
83 |
+
|
84 |
.footer-text {
|
85 |
color: #888;
|
86 |
font-size: 0.85rem;
|
|
|
89 |
}
|
90 |
"""
|
91 |
|
92 |
+
# 构建界面
|
93 |
+
with gr.Blocks(css=custom_css,
|
94 |
+
theme=gr.themes.Soft(),
|
95 |
+
title="TRELLIS - Service Temporarily Unavailable") as demo:
|
|
|
96 |
|
97 |
+
gr.HTML("""
|
|
|
|
|
98 |
<div class="notice-container">
|
99 |
<div class="maintenance-icon">🔧</div>
|
100 |
<h1 class="notice-title">Service Under Maintenance</h1>
|
|
|
104 |
</p>
|
105 |
<a href="https://image-to-3d.wingetgui.com/" target="_blank"
|
106 |
class="redirect-button">
|
107 |
+
Visit Alternative Service Now
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
</a>
|
109 |
</div>
|
110 |
+
""")
|
|
|
111 |
|
112 |
+
gr.HTML("""
|
|
|
|
|
113 |
<div class="status-card">
|
114 |
<div class="status-text">
|
115 |
🚀 <span class="highlight-text">Good News!</span><br><br>
|
116 |
+
We have prepared a fully functional alternative service for you:<br>
|
117 |
+
<strong>Image to 3D Online Service</strong>
|
118 |
</div>
|
119 |
<div class="status-text">
|
120 |
✨ <strong>Key Features:</strong><br>
|
121 |
+
• 🖼️ Image to 3D model conversion<br>
|
122 |
+
• ⚡ Fast processing, no GPU required<br>
|
123 |
• 🎨 High-quality output<br>
|
124 |
+
• 💻 No installation needed, use online
|
125 |
</div>
|
126 |
<div style="text-align: center;">
|
127 |
<a href="https://image-to-3d.wingetgui.com/" target="_blank"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
class="redirect-button-blue">
|
129 |
+
Visit Alternative Service Now
|
130 |
</a>
|
131 |
</div>
|
132 |
</div>
|
133 |
+
""")
|
|
|
134 |
|
135 |
+
gr.HTML("""
|
|
|
|
|
136 |
<div class="footer-text">
|
137 |
+
Thank you for choosing TRELLIS | We are committed to providing you with the best 3D generation experience
|
138 |
</div>
|
139 |
+
""")
|
|
|
140 |
|
141 |
return demo
|
142 |
|
143 |
|
144 |
if __name__ == "__main__":
|
|
|
145 |
app = create_notice_interface()
|
146 |
app.launch(
|
147 |
server_name="0.0.0.0",
|
148 |
server_port=7860,
|
149 |
share=False,
|
150 |
show_error=True,
|
151 |
+
quiet=False
|
152 |
)
|