Spaces:
Runtime error
Runtime error
Mathdesenvnonimate
commited on
Commit
•
2557ffa
1
Parent(s):
f997da9
Update app.py
Browse files
app.py
CHANGED
@@ -194,13 +194,9 @@ def process(input_image, prompt, prompt_neg='', input_elevation=0, input_num_ste
|
|
194 |
|
195 |
# gradio UI
|
196 |
|
197 |
-
_TITLE = '''LGM
|
198 |
|
199 |
_DESCRIPTION = '''
|
200 |
-
<div>
|
201 |
-
<a style="display:inline-block" href="https://me.kiui.moe/lgm/"><img src='https://img.shields.io/badge/public_website-8A2BE2'></a>
|
202 |
-
<a style="display:inline-block; margin-left: .5em" href="https://github.com/3DTopia/LGM"><img src='https://img.shields.io/github/stars/3DTopia/LGM?style=social'/></a>
|
203 |
-
</div>
|
204 |
|
205 |
* Se você achar o resultado insatisfatório, tente mudar a barra de seeds!
|
206 |
* O video é uma representação Parcial, o Resultado sera aprimorado por tecnicas de modelagem!
|
@@ -216,27 +212,25 @@ with block:
|
|
216 |
with gr.Row(variant='panel'):
|
217 |
with gr.Column(scale=1):
|
218 |
# input image
|
219 |
-
input_image = gr.Image(label="
|
220 |
# input prompt
|
221 |
input_text = gr.Textbox(label="prompt")
|
222 |
# negative prompt
|
223 |
-
input_neg_text = gr.Textbox(label="
|
224 |
# elevation
|
225 |
-
input_elevation = gr.Slider(label="
|
226 |
# inference steps
|
227 |
-
input_num_steps = gr.Slider(label="
|
228 |
# random seed
|
229 |
-
input_seed = gr.Slider(label="
|
230 |
# gen button
|
231 |
-
button_gen = gr.Button("
|
232 |
|
233 |
|
234 |
with gr.Column(scale=1):
|
235 |
with gr.Tab("Video"):
|
236 |
# final video results
|
237 |
output_video = gr.Video(label="video")
|
238 |
-
# ply file
|
239 |
-
output_file = gr.File(label="3D Gaussians (ply format)")
|
240 |
with gr.Tab("Multi-view Image"):
|
241 |
# multi-view results
|
242 |
output_image = gr.Image(interactive=False, show_label=False)
|
@@ -256,7 +250,7 @@ with block:
|
|
256 |
outputs=[output_image, output_video, output_file],
|
257 |
fn=lambda x: process(input_image=x, prompt=''),
|
258 |
cache_examples=True,
|
259 |
-
label='Image-to-3D
|
260 |
)
|
261 |
|
262 |
gr.Examples(
|
@@ -273,7 +267,7 @@ with block:
|
|
273 |
outputs=[output_image, output_video, output_file],
|
274 |
fn=lambda x: process(input_image=None, prompt=x),
|
275 |
cache_examples=True,
|
276 |
-
label='Text-to-3D
|
277 |
)
|
278 |
|
279 |
block.launch()
|
|
|
194 |
|
195 |
# gradio UI
|
196 |
|
197 |
+
_TITLE = '''LGM'''
|
198 |
|
199 |
_DESCRIPTION = '''
|
|
|
|
|
|
|
|
|
200 |
|
201 |
* Se você achar o resultado insatisfatório, tente mudar a barra de seeds!
|
202 |
* O video é uma representação Parcial, o Resultado sera aprimorado por tecnicas de modelagem!
|
|
|
212 |
with gr.Row(variant='panel'):
|
213 |
with gr.Column(scale=1):
|
214 |
# input image
|
215 |
+
input_image = gr.Image(label="imagem", type='pil')
|
216 |
# input prompt
|
217 |
input_text = gr.Textbox(label="prompt")
|
218 |
# negative prompt
|
219 |
+
input_neg_text = gr.Textbox(label="prompt negativo", value='ugly, blurry, pixelated obscure, unnatural colors, poor lighting, dull, unclear, cropped, lowres, low quality, artifacts, duplicate')
|
220 |
# elevation
|
221 |
+
input_elevation = gr.Slider(label="elevação", minimum=-90, maximum=90, step=1, value=0)
|
222 |
# inference steps
|
223 |
+
input_num_steps = gr.Slider(label="passos de inferencia", minimum=1, maximum=100, step=1, value=30)
|
224 |
# random seed
|
225 |
+
input_seed = gr.Slider(label="seed aleatoria", minimum=0, maximum=100000, step=1, value=0)
|
226 |
# gen button
|
227 |
+
button_gen = gr.Button("Gerar")
|
228 |
|
229 |
|
230 |
with gr.Column(scale=1):
|
231 |
with gr.Tab("Video"):
|
232 |
# final video results
|
233 |
output_video = gr.Video(label="video")
|
|
|
|
|
234 |
with gr.Tab("Multi-view Image"):
|
235 |
# multi-view results
|
236 |
output_image = gr.Image(interactive=False, show_label=False)
|
|
|
250 |
outputs=[output_image, output_video, output_file],
|
251 |
fn=lambda x: process(input_image=x, prompt=''),
|
252 |
cache_examples=True,
|
253 |
+
label='Image-to-3D Exemplos'
|
254 |
)
|
255 |
|
256 |
gr.Examples(
|
|
|
267 |
outputs=[output_image, output_video, output_file],
|
268 |
fn=lambda x: process(input_image=None, prompt=x),
|
269 |
cache_examples=True,
|
270 |
+
label='Text-to-3D Exemplos'
|
271 |
)
|
272 |
|
273 |
block.launch()
|