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

Update app_en.py

Browse files
Files changed (1) hide show
  1. app_en.py +37 -76
app_en.py CHANGED
@@ -1,7 +1,7 @@
1
  #!/usr/bin/env python3
2
  # -*- coding: utf-8 -*-
3
  """
4
- TRELLIS 维护通知界面(双按钮版)
5
  依赖:Python 3.8+、gradio 4.*
6
  """
7
 
@@ -10,13 +10,13 @@ import gradio as gr
10
  def create_notice_interface():
11
  """创建维护通知界面"""
12
 
13
- # 自定义 CSS
14
  custom_css = """
15
  .notice-container {
16
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
  padding: 1.5rem;
18
- border-radius: 20px;
19
- box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
20
  text-align: center;
21
  margin: 2rem auto;
22
  max-width: 600px;
@@ -24,101 +24,69 @@ def create_notice_interface():
24
 
25
  .notice-title {
26
  color: #fff;
27
- font-size: 2rem;
28
- font-weight: bold;
29
- margin-bottom: 0.8rem;
30
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
31
  }
32
 
33
  .notice-subtitle {
34
- color: #f5f5f5;
35
  font-size: 1rem;
 
36
  margin-bottom: 1.5rem;
37
- line-height: 1.5;
38
  }
39
 
40
  .maintenance-icon {
41
- font-size: 3rem;
42
- margin-bottom: 0.8rem;
43
  display: block;
44
  }
45
 
46
- /* 顶部紫红按钮 */
47
- .redirect-button {
48
- background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
49
- color: #fff;
50
- padding: 12px 28px;
51
  border: none;
52
- border-radius: 40px;
53
  font-size: 1rem;
54
- font-weight: bold;
55
  cursor: pointer;
56
- transition: all 0.3s ease;
57
  text-decoration: none;
58
  display: inline-block;
59
- margin: 0.5rem;
60
- box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
61
- }
62
- .redirect-button:hover {
63
- transform: translateY(-3px);
64
- box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
65
  }
66
 
67
- /* 新增蓝色按钮 */
68
- .redirect-button-blue {
69
- background: linear-gradient(45deg, #3B82F6, #60A5FA);
70
- color: #fff;
71
- padding: 12px 28px;
72
- border: none;
73
- border-radius: 40px;
74
- font-size: 1rem;
75
- font-weight: bold;
76
- cursor: pointer;
77
- transition: all 0.3s ease;
78
- text-decoration: none;
79
- display: inline-block;
80
- margin-top: 1rem;
81
- box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
82
- }
83
- .redirect-button-blue:hover {
84
- transform: translateY(-3px);
85
- box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
86
  }
87
 
88
  .status-card {
89
- background: rgba(255, 255, 255, 0.95);
90
- border-radius: 15px;
91
- padding: 2rem;
92
- margin: 2rem 0;
93
- box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
 
94
  }
95
 
96
  .status-text {
97
  color: #333;
98
  font-size: 1rem;
99
- line-height: 1.7;
100
  margin-bottom: 1rem;
101
  }
102
 
103
  .highlight-text {
104
- color: #667eea;
105
  font-weight: bold;
106
  }
107
 
108
  .footer-text {
109
- color: rgba(255, 255, 255, 0.8);
110
  font-size: 0.85rem;
 
111
  margin-top: 2rem;
112
  }
113
-
114
- .pulse {
115
- animation: pulse 2s infinite;
116
- }
117
- @keyframes pulse {
118
- 0% { transform: scale(1); }
119
- 50% { transform: scale(1.05); }
120
- 100% { transform: scale(1); }
121
- }
122
  """
123
 
124
  # 构建界面
@@ -126,7 +94,6 @@ def create_notice_interface():
126
  theme=gr.themes.Soft(),
127
  title="TRELLIS - Service Temporarily Unavailable") as demo:
128
 
129
- # 顶部维护卡片(含紫红按钮)
130
  gr.HTML("""
131
  <div class="notice-container">
132
  <div class="maintenance-icon">🔧</div>
@@ -136,13 +103,12 @@ def create_notice_interface():
136
  We are working hard to improve our service and will be back soon.
137
  </p>
138
  <a href="https://image-to-3d.wingetgui.com/" target="_blank"
139
- class="redirect-button pulse">
140
- 🌟 Visit Alternative Service Now 🌟
141
  </a>
142
  </div>
143
  """)
144
 
145
- # Good News 卡片 + 蓝色按钮
146
  gr.HTML("""
147
  <div class="status-card">
148
  <div class="status-text">
@@ -157,22 +123,18 @@ def create_notice_interface():
157
  • 🎨 High-quality output<br>
158
  • 💻 No installation needed, use online
159
  </div>
160
- <!-- 蓝色按钮 -->
161
  <div style="text-align: center;">
162
  <a href="https://image-to-3d.wingetgui.com/" target="_blank"
163
- class="redirect-button-blue pulse">
164
- 🌟 Visit Alternative Service Now 🌟
165
  </a>
166
  </div>
167
  </div>
168
  """)
169
 
170
- # 页脚
171
  gr.HTML("""
172
- <div style="text-align: center;">
173
- <p class="footer-text">
174
- Thank you for choosing TRELLIS | We are committed to providing you with the best 3D generation experience
175
- </p>
176
  </div>
177
  """)
178
 
@@ -180,7 +142,6 @@ def create_notice_interface():
180
 
181
 
182
  if __name__ == "__main__":
183
- # 启动 Gradio 应用
184
  app = create_notice_interface()
185
  app.launch(
186
  server_name="0.0.0.0",
 
1
  #!/usr/bin/env python3
2
  # -*- coding: utf-8 -*-
3
  """
4
+ TRELLIS 维护通知界面(正式版)
5
  依赖:Python 3.8+、gradio 4.*
6
  """
7
 
 
10
  def create_notice_interface():
11
  """创建维护通知界面"""
12
 
13
+ # 正式风格的 CSS(无动画)
14
  custom_css = """
15
  .notice-container {
16
+ background-color: #3B82F6;
17
  padding: 1.5rem;
18
+ border-radius: 12px;
19
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
20
  text-align: center;
21
  margin: 2rem auto;
22
  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
 
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;
48
+ padding: 10px 24px;
 
49
  border: none;
50
+ border-radius: 6px;
51
  font-size: 1rem;
52
+ font-weight: 600;
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;
66
+ padding: 1.5rem;
67
+ margin: 2rem auto;
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;
87
+ text-align: center;
88
  margin-top: 2rem;
89
  }
 
 
 
 
 
 
 
 
 
90
  """
91
 
92
  # 构建界面
 
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>
 
103
  We are working hard to improve our service and will be back soon.
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">
 
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
 
 
142
 
143
 
144
  if __name__ == "__main__":
 
145
  app = create_notice_interface()
146
  app.launch(
147
  server_name="0.0.0.0",