jaisree67 commited on
Commit
cb8d2a6
1 Parent(s): bc5a4f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -33
app.py CHANGED
@@ -1,33 +1,33 @@
1
- #!/usr/bin/env python
2
-
3
- import os
4
-
5
- import gradio as gr
6
- import torch
7
-
8
- from app_image_to_3d import create_demo as create_demo_image_to_3d
9
- from app_text_to_3d import create_demo as create_demo_text_to_3d
10
- from model import Model
11
-
12
- DESCRIPTION = "# [Shap-E](https://github.com/openai/shap-e)"
13
-
14
- if not torch.cuda.is_available():
15
- DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
16
-
17
- model = Model()
18
-
19
- with gr.Blocks(css_paths="style.css") as demo:
20
- gr.Markdown(DESCRIPTION)
21
- gr.DuplicateButton(
22
- value="Duplicate Space for private use",
23
- elem_id="duplicate-button",
24
- visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
25
- )
26
- with gr.Tabs():
27
- with gr.Tab(label="Text to 3D"):
28
- create_demo_text_to_3d(model)
29
- with gr.Tab(label="Image to 3D"):
30
- create_demo_image_to_3d(model)
31
-
32
- if __name__ == "__main__":
33
- demo.queue(max_size=10).launch()
 
1
+ #!/usr/bin/env python
2
+
3
+ import os
4
+
5
+ import gradio as gr
6
+ import torch
7
+
8
+ from app_image_to_3d import create_demo as create_demo_image_to_3d
9
+ from app_text_to_3d import create_demo as create_demo_text_to_3d
10
+ from model import Model
11
+
12
+ DESCRIPTION = "# [TRIACX](https://github.com/openai/shap-e)"
13
+
14
+ if not torch.cuda.is_available():
15
+ DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
16
+
17
+ model = Model()
18
+
19
+ with gr.Blocks(css_paths="style.css") as demo:
20
+ gr.Markdown(DESCRIPTION)
21
+ gr.DuplicateButton(
22
+ value="Duplicate Space for private use",
23
+ elem_id="duplicate-button",
24
+ visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
25
+ )
26
+ with gr.Tabs():
27
+ with gr.Tab(label="Text to 3D"):
28
+ create_demo_text_to_3d(model)
29
+ with gr.Tab(label="Image to 3D"):
30
+ create_demo_image_to_3d(model)
31
+
32
+ if __name__ == "__main__":
33
+ demo.queue(max_size=10).launch()