gradio==4.1.1
Browse files- README.md +1 -1
- app_image_to_3d.py +4 -2
- app_text_to_3d.py +4 -2
- requirements.txt +5 -5
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🧢
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
python_version: 3.10.13
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.1.1
|
| 8 |
python_version: 3.10.13
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
app_image_to_3d.py
CHANGED
|
@@ -31,7 +31,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 31 |
return model.run_image(image, seed, guidance_scale, num_inference_steps)
|
| 32 |
|
| 33 |
with gr.Blocks() as demo:
|
| 34 |
-
with gr.
|
| 35 |
image = gr.Image(label="Input image", show_label=False, type="pil")
|
| 36 |
run_button = gr.Button("Run")
|
| 37 |
result = gr.Model3D(label="Result", show_label=False)
|
|
@@ -71,8 +71,8 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 71 |
fn=randomize_seed_fn,
|
| 72 |
inputs=[seed, randomize_seed],
|
| 73 |
outputs=seed,
|
| 74 |
-
queue=False,
|
| 75 |
api_name=False,
|
|
|
|
| 76 |
).then(
|
| 77 |
fn=run,
|
| 78 |
inputs=[
|
|
@@ -83,5 +83,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 83 |
],
|
| 84 |
outputs=result,
|
| 85 |
api_name="image-to-3d",
|
|
|
|
|
|
|
| 86 |
)
|
| 87 |
return demo
|
|
|
|
| 31 |
return model.run_image(image, seed, guidance_scale, num_inference_steps)
|
| 32 |
|
| 33 |
with gr.Blocks() as demo:
|
| 34 |
+
with gr.Group():
|
| 35 |
image = gr.Image(label="Input image", show_label=False, type="pil")
|
| 36 |
run_button = gr.Button("Run")
|
| 37 |
result = gr.Model3D(label="Result", show_label=False)
|
|
|
|
| 71 |
fn=randomize_seed_fn,
|
| 72 |
inputs=[seed, randomize_seed],
|
| 73 |
outputs=seed,
|
|
|
|
| 74 |
api_name=False,
|
| 75 |
+
concurrency_limit=None,
|
| 76 |
).then(
|
| 77 |
fn=run,
|
| 78 |
inputs=[
|
|
|
|
| 83 |
],
|
| 84 |
outputs=result,
|
| 85 |
api_name="image-to-3d",
|
| 86 |
+
concurrency_id="gpu",
|
| 87 |
+
concurrency_limit=1,
|
| 88 |
)
|
| 89 |
return demo
|
app_text_to_3d.py
CHANGED
|
@@ -30,7 +30,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 30 |
return model.run_text(prompt, seed, guidance_scale, num_inference_steps)
|
| 31 |
|
| 32 |
with gr.Blocks() as demo:
|
| 33 |
-
with gr.
|
| 34 |
with gr.Row(elem_id="prompt-container"):
|
| 35 |
prompt = gr.Text(
|
| 36 |
label="Prompt",
|
|
@@ -78,8 +78,8 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 78 |
fn=randomize_seed_fn,
|
| 79 |
inputs=[seed, randomize_seed],
|
| 80 |
outputs=seed,
|
| 81 |
-
queue=False,
|
| 82 |
api_name=False,
|
|
|
|
| 83 |
).then(
|
| 84 |
fn=run,
|
| 85 |
inputs=[
|
|
@@ -90,5 +90,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
| 90 |
],
|
| 91 |
outputs=result,
|
| 92 |
api_name="text-to-3d",
|
|
|
|
|
|
|
| 93 |
)
|
| 94 |
return demo
|
|
|
|
| 30 |
return model.run_text(prompt, seed, guidance_scale, num_inference_steps)
|
| 31 |
|
| 32 |
with gr.Blocks() as demo:
|
| 33 |
+
with gr.Group():
|
| 34 |
with gr.Row(elem_id="prompt-container"):
|
| 35 |
prompt = gr.Text(
|
| 36 |
label="Prompt",
|
|
|
|
| 78 |
fn=randomize_seed_fn,
|
| 79 |
inputs=[seed, randomize_seed],
|
| 80 |
outputs=seed,
|
|
|
|
| 81 |
api_name=False,
|
| 82 |
+
concurrency_limit=None,
|
| 83 |
).then(
|
| 84 |
fn=run,
|
| 85 |
inputs=[
|
|
|
|
| 90 |
],
|
| 91 |
outputs=result,
|
| 92 |
api_name="text-to-3d",
|
| 93 |
+
concurrency_id="gpu",
|
| 94 |
+
concurrency_limit=1,
|
| 95 |
)
|
| 96 |
return demo
|
requirements.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
-
accelerate==0.
|
| 2 |
diffusers==0.21.4
|
| 3 |
-
gradio==
|
| 4 |
-
spaces==0.
|
| 5 |
torch==2.0.0
|
| 6 |
torchvision==0.15.1
|
| 7 |
-
transformers==4.
|
| 8 |
-
trimesh==
|
|
|
|
| 1 |
+
accelerate==0.24.1
|
| 2 |
diffusers==0.21.4
|
| 3 |
+
gradio==4.1.1
|
| 4 |
+
spaces==0.18.0
|
| 5 |
torch==2.0.0
|
| 6 |
torchvision==0.15.1
|
| 7 |
+
transformers==4.35.0
|
| 8 |
+
trimesh==4.0.2
|