Spaces:
Runtime error
Runtime error
Update
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🧢
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
python_version: 3.10.11
|
9 |
app_file: app.py
|
10 |
pinned: false
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.36.0
|
8 |
python_version: 3.10.11
|
9 |
app_file: app.py
|
10 |
pinned: false
|
app.py
CHANGED
@@ -11,8 +11,6 @@ from model import Model
|
|
11 |
|
12 |
DESCRIPTION = '# [Shap-E](https://github.com/openai/shap-e)'
|
13 |
|
14 |
-
if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
|
15 |
-
DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
16 |
if not torch.cuda.is_available():
|
17 |
DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>'
|
18 |
|
@@ -20,6 +18,9 @@ model = Model()
|
|
20 |
|
21 |
with gr.Blocks(css='style.css') as demo:
|
22 |
gr.Markdown(DESCRIPTION)
|
|
|
|
|
|
|
23 |
with gr.Tabs():
|
24 |
with gr.Tab(label='Text to 3D'):
|
25 |
create_demo_text_to_3d(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 |
|
|
|
18 |
|
19 |
with gr.Blocks(css='style.css') as demo:
|
20 |
gr.Markdown(DESCRIPTION)
|
21 |
+
gr.DuplicateButton(value='Duplicate Space for private use',
|
22 |
+
elem_id='duplicate-button',
|
23 |
+
visible=os.getenv('SYSTEM') == 'spaces')
|
24 |
with gr.Tabs():
|
25 |
with gr.Tab(label='Text to 3D'):
|
26 |
create_demo_text_to_3d(model)
|
app_text_to_3d.py
CHANGED
@@ -26,12 +26,12 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
26 |
with gr.Blocks() as demo:
|
27 |
with gr.Box():
|
28 |
with gr.Row(elem_id='prompt-container'):
|
29 |
-
prompt = gr.Text(
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
run_button = gr.Button('Run'
|
35 |
result = gr.Model3D(label='Result', show_label=False)
|
36 |
with gr.Accordion('Advanced options', open=False):
|
37 |
seed = gr.Slider(label='Seed',
|
|
|
26 |
with gr.Blocks() as demo:
|
27 |
with gr.Box():
|
28 |
with gr.Row(elem_id='prompt-container'):
|
29 |
+
prompt = gr.Text(label='Prompt',
|
30 |
+
show_label=False,
|
31 |
+
max_lines=1,
|
32 |
+
placeholder='Enter your prompt',
|
33 |
+
container=False)
|
34 |
+
run_button = gr.Button('Run', scale=0)
|
35 |
result = gr.Model3D(label='Result', show_label=False)
|
36 |
with gr.Accordion('Advanced options', open=False):
|
37 |
seed = gr.Slider(label='Seed',
|
style.css
CHANGED
@@ -11,3 +11,7 @@ h1 {
|
|
11 |
#prompt-container {
|
12 |
gap: 0;
|
13 |
}
|
|
|
|
|
|
|
|
|
|
11 |
#prompt-container {
|
12 |
gap: 0;
|
13 |
}
|
14 |
+
|
15 |
+
#duplicate-button {
|
16 |
+
margin: auto;
|
17 |
+
}
|