Spaces:
Build error
Build error
neverix
commited on
Commit
•
a80716a
1
Parent(s):
6eaf4c8
Maybe better clouds
Browse files- app.py +7 -5
- pulsar_clip.py +2 -2
app.py
CHANGED
@@ -27,12 +27,13 @@ def generate(*args):
|
|
27 |
model_path = f"{filename}.obj"
|
28 |
pc.save_obj(model_path)
|
29 |
# model_path = None # TODO
|
30 |
-
return [video_path, model_path]
|
31 |
|
32 |
|
33 |
def main():
|
34 |
with gr.Blocks() as ui:
|
35 |
gr.Markdown("# Pulsar+CLIP")
|
|
|
36 |
gr.Markdown("Generate 3D point clouds from text!")
|
37 |
|
38 |
with gr.Group():
|
@@ -63,14 +64,15 @@ def main():
|
|
63 |
gr.Markdown("## Result")
|
64 |
with gr.Row():
|
65 |
with gr.Column():
|
66 |
-
|
67 |
with gr.Column():
|
68 |
-
|
|
|
69 |
|
70 |
-
button.click(fn=generate, inputs=inputs, outputs=[
|
71 |
|
72 |
gr.Markdown("## Examples")
|
73 |
-
gr.Examples(fn=generate, inputs=inputs, outputs=[
|
74 |
examples=[defaults], cache_examples=True, examples_per_page=1)
|
75 |
return ui
|
76 |
|
|
|
27 |
model_path = f"{filename}.obj"
|
28 |
pc.save_obj(model_path)
|
29 |
# model_path = None # TODO
|
30 |
+
return [video_path, model_path, model_path]
|
31 |
|
32 |
|
33 |
def main():
|
34 |
with gr.Blocks() as ui:
|
35 |
gr.Markdown("# Pulsar+CLIP")
|
36 |
+
gr.Markdown("<a target="_blank" href="https://colab.research.google.com/github/https://colab.research.google.com/drive/1IvV3HGoNjRoyAKIX-aqSWa-t70PW3nPs"> <img src='https://colab.research.google.com/assets/colab-badge.svg' alt='Open In Colab'/></a>"
|
37 |
gr.Markdown("Generate 3D point clouds from text!")
|
38 |
|
39 |
with gr.Group():
|
|
|
64 |
gr.Markdown("## Result")
|
65 |
with gr.Row():
|
66 |
with gr.Column():
|
67 |
+
video_result = gr.Video()
|
68 |
with gr.Column():
|
69 |
+
model_demo = gr.Model3D()
|
70 |
+
model_file = gr.File()
|
71 |
|
72 |
+
button.click(fn=generate, inputs=inputs, outputs=[video_result, model_demo, model_file])
|
73 |
|
74 |
gr.Markdown("## Examples")
|
75 |
+
gr.Examples(fn=generate, inputs=inputs, outputs=[video_result, model_demo, model_file],
|
76 |
examples=[defaults], cache_examples=True, examples_per_page=1)
|
77 |
return ui
|
78 |
|
pulsar_clip.py
CHANGED
@@ -28,7 +28,7 @@ CONFIG_SPEC = [
|
|
28 |
("offset_random", 0.75, float),
|
29 |
("xyz_random", 0.25, float),
|
30 |
("altitude_range", 0.3, float),
|
31 |
-
("augments",
|
32 |
]),
|
33 |
("Optimization", [
|
34 |
("epochs", 6, int),
|
@@ -50,7 +50,7 @@ CONFIG_SPEC = [
|
|
50 |
("log_opacity", False, bool), #@param {type: "boolean"}
|
51 |
|
52 |
("min_radius", 0.030, float),
|
53 |
-
("max_radius", 0.
|
54 |
("log_radius", False, bool),
|
55 |
|
56 |
# TODO dynamically decide bezier_res
|
|
|
28 |
("offset_random", 0.75, float),
|
29 |
("xyz_random", 0.25, float),
|
30 |
("altitude_range", 0.3, float),
|
31 |
+
("augments", 3, int),
|
32 |
]),
|
33 |
("Optimization", [
|
34 |
("epochs", 6, int),
|
|
|
50 |
("log_opacity", False, bool), #@param {type: "boolean"}
|
51 |
|
52 |
("min_radius", 0.030, float),
|
53 |
+
("max_radius", 0.150, float),
|
54 |
("log_radius", False, bool),
|
55 |
|
56 |
# TODO dynamically decide bezier_res
|