Spaces:
Running
on
Zero
Running
on
Zero
chore: add access auth
Browse files
app.py
CHANGED
@@ -241,14 +241,16 @@ examples = [os.path.join(example_folder, f) for f in os.listdir(example_folder)
|
|
241 |
|
242 |
with gr.Blocks() as demo:
|
243 |
with gr.Row():
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
|
249 |
-
|
250 |
|
251 |
-
|
|
|
|
|
252 |
img_input = gr.Image(type="pil", label="输入图像")
|
253 |
examples_component = gr.Examples(examples=examples, inputs=img_input, outputs=None, examples_per_page=3)
|
254 |
generate_mesh_button = gr.Button("生成模型")
|
@@ -259,10 +261,10 @@ with gr.Blocks() as demo:
|
|
259 |
with gr.Column():
|
260 |
model_output = LitModel3D(
|
261 |
clear_color=[0, 0, 0, 0], # 可调整背景颜色,以获得更好的对比度
|
262 |
-
label="
|
263 |
scale=1.0,
|
264 |
tonemapping="aces", # 可使用 aces 色调映射,使灯光更逼真
|
265 |
-
exposure=1.
|
266 |
contrast=1.1, # 可略微增加对比度,以获得更好的深度
|
267 |
camera_position=(0, 0, 2), # 将设置初始摄像机位置,使模型居中
|
268 |
zoom_speed=0.5, # 将调整变焦速度,以便更好地控制
|
@@ -287,4 +289,4 @@ with gr.Blocks() as demo:
|
|
287 |
generate_mesh_button.click(step_1_generate_obj, inputs=img_input, outputs=[obj_file_output, model_output])
|
288 |
# generate_video_button.click(step_2_generate_video, inputs=img_input, outputs=video_file_output)
|
289 |
|
290 |
-
demo.launch()
|
|
|
241 |
|
242 |
with gr.Blocks() as demo:
|
243 |
with gr.Row():
|
244 |
+
gr.Markdown("""
|
245 |
+
# Image Upscale Demo
|
246 |
+
|
247 |
+
从单张图像生成三维点云并创建带色彩的 .obj 模型
|
248 |
|
249 |
+
""")
|
250 |
|
251 |
+
with gr.Row():
|
252 |
+
|
253 |
+
with gr.Column():
|
254 |
img_input = gr.Image(type="pil", label="输入图像")
|
255 |
examples_component = gr.Examples(examples=examples, inputs=img_input, outputs=None, examples_per_page=3)
|
256 |
generate_mesh_button = gr.Button("生成模型")
|
|
|
261 |
with gr.Column():
|
262 |
model_output = LitModel3D(
|
263 |
clear_color=[0, 0, 0, 0], # 可调整背景颜色,以获得更好的对比度
|
264 |
+
label="模型可视化",
|
265 |
scale=1.0,
|
266 |
tonemapping="aces", # 可使用 aces 色调映射,使灯光更逼真
|
267 |
+
exposure=1.1, # 可调节曝光以控制亮度
|
268 |
contrast=1.1, # 可略微增加对比度,以获得更好的深度
|
269 |
camera_position=(0, 0, 2), # 将设置初始摄像机位置,使模型居中
|
270 |
zoom_speed=0.5, # 将调整变焦速度,以便更好地控制
|
|
|
289 |
generate_mesh_button.click(step_1_generate_obj, inputs=img_input, outputs=[obj_file_output, model_output])
|
290 |
# generate_video_button.click(step_2_generate_video, inputs=img_input, outputs=video_file_output)
|
291 |
|
292 |
+
demo.launch(auth=(os.environ.get('AUTH_USERNAME'), os.environ.get('AUTH_PASSWORD')))
|