innoai commited on
Commit
27b16f4
·
verified ·
1 Parent(s): 5bd7177

Update app_en.py

Browse files
Files changed (1) hide show
  1. app_en.py +51 -33
app_en.py CHANGED
@@ -1,16 +1,17 @@
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,27 +22,23 @@ def create_notice_interface():
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,13 +50,11 @@ def create_notice_interface():
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,19 +63,16 @@ def create_notice_interface():
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,12 +81,15 @@ def create_notice_interface():
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,49 +99,72 @@ def create_notice_interface():
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
  )
 
1
  #!/usr/bin/env python3
2
  # -*- coding: utf-8 -*-
3
  """
4
+ TRELLIS Maintenance Notice Interface (Production)
5
+ Requirements: Python 3.8+ and Gradio 4.*
6
  """
7
 
8
  import gradio as gr
9
 
10
+
11
  def create_notice_interface():
12
+ """Build the maintenance notice interface."""
13
 
14
+ # Custom CSS (clean blue theme, no animation)
15
  custom_css = """
16
  .notice-container {
17
  background-color: #3B82F6;
 
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
  cursor: pointer;
51
  text-decoration: none;
52
  display: inline-block;
53
+ margin: 0.5rem 0.4rem;
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
  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
  }
82
  """
83
 
84
+ with gr.Blocks(
85
+ css=custom_css,
86
+ theme=gr.themes.Soft(),
87
+ title="TRELLIS - Service Temporarily Unavailable",
88
+ ) as demo:
89
 
90
+ # Top notice banner with alternative service buttons
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
  </p>
100
  <a href="https://image-to-3d.wingetgui.com/" target="_blank"
101
  class="redirect-button">
102
+ Hunyuan3D&nbsp;1.0&nbsp;(no&nbsp;user&nbsp;GPU&nbsp;required)
103
+ </a>
104
+ <a href="https://partpacker.wingetgui.com/" target="_blank"
105
+ class="redirect-button-blue">
106
+ Partpacker&nbsp;(Recommended)
107
+ </a>
108
+ <a href="https://hunyuan3d21.wingetgui.com/" target="_blank"
109
+ class="redirect-button-blue">
110
+ Hunyuan3D&nbsp;2.1
111
  </a>
112
  </div>
113
+ """
114
+ )
115
 
116
+ # Feature card
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
+ Fully functional alternative services are ready for you:
 
123
  </div>
124
  <div class="status-text">
125
  ✨ <strong>Key Features:</strong><br>
126
+ • 🖼️ Image-to-3D model conversion (Hunyuan3D 1.0 / 2.1)<br>
127
+ • ⚡ Fast processing, <strong>no user GPU required for Hunyuan3D&nbsp;1.0</strong><br>
128
  • 🎨 High-quality output<br>
129
+ • 💻 100% browser-based, no installation needed
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&nbsp;1.0&nbsp;(no&nbsp;user&nbsp;GPU&nbsp;required)
135
+ </a>
136
+ <a href="https://partpacker.wingetgui.com/" target="_blank"
137
+ class="redirect-button-blue">
138
+ Partpacker&nbsp;(Recommended)
139
+ </a>
140
+ <a href="https://hunyuan3d21.wingetgui.com/" target="_blank"
141
  class="redirect-button-blue">
142
+ Hunyuan3D&nbsp;2.1
143
  </a>
144
  </div>
145
  </div>
146
+ """
147
+ )
148
 
149
+ # Footer
150
+ gr.HTML(
151
+ """
152
  <div class="footer-text">
153
+ Thank you for choosing TRELLIS &nbsp;|&nbsp; We are committed to providing you with the best 3D generation experience
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
  )