Update app_text_to_3d.py
Browse files- app_text_to_3d.py +3 -19
app_text_to_3d.py
CHANGED
@@ -6,13 +6,6 @@ from model import Model
|
|
6 |
from settings import CACHE_EXAMPLES, MAX_SEED
|
7 |
from utils import randomize_seed_fn
|
8 |
|
9 |
-
caption = gr.load(name="spaces/fffiloni/CoCa-clone")
|
10 |
-
|
11 |
-
def create_image_caption(image_init):
|
12 |
-
cap = caption(image_init, "Beam search", 1.2, 0.5, 5, 20, fn_index=0)
|
13 |
-
print("cap: " + cap)
|
14 |
-
return cap, gr.update(visible=True)
|
15 |
-
|
16 |
def create_demo(model: Model) -> gr.Blocks:
|
17 |
|
18 |
with gr.Blocks() as demo:
|
@@ -48,23 +41,14 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
48 |
value=64)
|
49 |
|
50 |
|
51 |
-
|
52 |
inputs = [
|
53 |
-
|
54 |
seed,
|
55 |
guidance_scale,
|
56 |
num_inference_steps,
|
57 |
]
|
58 |
-
|
59 |
-
fn=randomize_seed_fn,
|
60 |
-
inputs=[seed, randomize_seed],
|
61 |
-
outputs=seed,
|
62 |
-
queue=False,
|
63 |
-
).then(
|
64 |
-
fn=model.run_text,
|
65 |
-
inputs=inputs,
|
66 |
-
outputs=result,
|
67 |
-
)
|
68 |
run_button.click(
|
69 |
fn=randomize_seed_fn,
|
70 |
inputs=[seed, randomize_seed],
|
|
|
6 |
from settings import CACHE_EXAMPLES, MAX_SEED
|
7 |
from utils import randomize_seed_fn
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
def create_demo(model: Model) -> gr.Blocks:
|
10 |
|
11 |
with gr.Blocks() as demo:
|
|
|
41 |
value=64)
|
42 |
|
43 |
|
44 |
+
|
45 |
inputs = [
|
46 |
+
image_init,
|
47 |
seed,
|
48 |
guidance_scale,
|
49 |
num_inference_steps,
|
50 |
]
|
51 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
run_button.click(
|
53 |
fn=randomize_seed_fn,
|
54 |
inputs=[seed, randomize_seed],
|