innoai commited on
Commit
1a5db40
·
verified ·
1 Parent(s): 17579a7

Update app_en.py

Browse files
Files changed (1) hide show
  1. app_en.py +42 -14
app_en.py CHANGED
@@ -1,30 +1,30 @@
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: 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; /* 缩小宽度 */
23
  }
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);
@@ -38,11 +38,12 @@ def create_notice_interface():
38
  }
39
 
40
  .maintenance-icon {
41
- font-size: 3rem; /* 调小图标 */
42
  margin-bottom: 0.8rem;
43
  display: block;
44
  }
45
 
 
46
  .redirect-button {
47
  background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
48
  color: #fff;
@@ -58,12 +59,32 @@ def create_notice_interface():
58
  margin: 0.5rem;
59
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
60
  }
61
-
62
  .redirect-button:hover {
63
  transform: translateY(-3px);
64
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
65
  }
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  .status-card {
68
  background: rgba(255, 255, 255, 0.95);
69
  border-radius: 15px;
@@ -105,7 +126,7 @@ def create_notice_interface():
105
  theme=gr.themes.Soft(),
106
  title="TRELLIS - Service Temporarily Unavailable") as demo:
107
 
108
- # Service Under Maintenance 卡片(含按钮)
109
  gr.HTML("""
110
  <div class="notice-container">
111
  <div class="maintenance-icon">🔧</div>
@@ -121,7 +142,7 @@ def create_notice_interface():
121
  </div>
122
  """)
123
 
124
- # 功能展示卡片
125
  gr.HTML("""
126
  <div class="status-card">
127
  <div class="status-text">
@@ -133,9 +154,16 @@ def create_notice_interface():
133
  ✨ <strong>Key Features:</strong><br>
134
  • 🖼️ Image to 3D model conversion<br>
135
  • ⚡ Fast processing, no GPU required<br>
136
- • 🎨 Highquality output<br>
137
  • 💻 No installation needed, use online
138
  </div>
 
 
 
 
 
 
 
139
  </div>
140
  """)
141
 
@@ -152,12 +180,12 @@ def create_notice_interface():
152
 
153
 
154
  if __name__ == "__main__":
155
- # 创建并启动程序
156
- demo_app = create_notice_interface()
157
- demo_app.launch(
158
  server_name="0.0.0.0",
159
  server_port=7860,
160
- share=True,
161
  show_error=True,
162
  quiet=False
163
  )
 
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: 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;
23
  }
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);
 
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;
 
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;
 
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>
 
142
  </div>
143
  """)
144
 
145
+ # Good News 卡片 + 蓝色按钮
146
  gr.HTML("""
147
  <div class="status-card">
148
  <div class="status-text">
 
154
  ✨ <strong>Key Features:</strong><br>
155
  • 🖼️ Image to 3D model conversion<br>
156
  • ⚡ Fast processing, no GPU required<br>
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
 
 
180
 
181
 
182
  if __name__ == "__main__":
183
+ # 启动 Gradio 应用
184
+ app = create_notice_interface()
185
+ app.launch(
186
  server_name="0.0.0.0",
187
  server_port=7860,
188
+ share=False,
189
  show_error=True,
190
  quiet=False
191
  )