Spaces:
Runtime error
Runtime error
Fixed bug in input parsing
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def inference(
|
|
69 |
|
70 |
seed_everything(seed)
|
71 |
start_code = torch.randn([len(prompts), 4, 128, 128], device=device)
|
72 |
-
eos_token_index = num_tokens + 1
|
73 |
|
74 |
editor = BoundedAttention(
|
75 |
boxes,
|
@@ -230,6 +230,8 @@ def main():
|
|
230 |
gr.HTML(COPY_LINK)
|
231 |
|
232 |
with gr.Column():
|
|
|
|
|
233 |
prompt = gr.Textbox(
|
234 |
label="Text prompt",
|
235 |
)
|
@@ -336,7 +338,10 @@ def main():
|
|
336 |
|
337 |
with gr.Column():
|
338 |
gr.Examples(
|
339 |
-
examples=[
|
|
|
|
|
|
|
340 |
inputs=[prompt, subject_token_indices, filter_token_indices, num_tokens],
|
341 |
)
|
342 |
|
|
|
69 |
|
70 |
seed_everything(seed)
|
71 |
start_code = torch.randn([len(prompts), 4, 128, 128], device=device)
|
72 |
+
eos_token_index = None if num_tokens is None else num_tokens + 1
|
73 |
|
74 |
editor = BoundedAttention(
|
75 |
boxes,
|
|
|
230 |
gr.HTML(COPY_LINK)
|
231 |
|
232 |
with gr.Column():
|
233 |
+
gr.HTML("Scroll down to see examples of the required input format.")
|
234 |
+
|
235 |
prompt = gr.Textbox(
|
236 |
label="Text prompt",
|
237 |
)
|
|
|
338 |
|
339 |
with gr.Column():
|
340 |
gr.Examples(
|
341 |
+
examples=[
|
342 |
+
["a ginger kitten and a gray puppy in a yard", "2,3;6,7", "1,4,5,8,9", "10"],
|
343 |
+
["a realistic photo of a highway with a semi trailer and a concrete mixer and a helicopter", "9,10;13,14;17", "1,4,5,7,8,11,12,15,16", "17"],
|
344 |
+
],
|
345 |
inputs=[prompt, subject_token_indices, filter_token_indices, num_tokens],
|
346 |
)
|
347 |
|