Spaces:
Runtime error
Runtime error
update
Browse files- app.py +7 -7
- exemplars/carved_by.jpg +0 -0
- exemplars/inside.jpg +0 -0
- exemplars/painted_on.jpg +0 -0
app.py
CHANGED
|
@@ -49,7 +49,7 @@ ReVersion
|
|
| 49 |
'''
|
| 50 |
DETAILDESCRIPTION='''
|
| 51 |
We propose a new task, **Relation Inversion**: Given a few exemplar images, where a relation co-exists in every image, we aim to find a relation prompt **\<R>** to capture this interaction, and apply the relation to new entities to synthesize new scenes.
|
| 52 |
-
You can choose
|
| 53 |
'''
|
| 54 |
|
| 55 |
|
|
@@ -86,7 +86,7 @@ def create_inference_demo(func: inference_fn) -> gr.Blocks:
|
|
| 86 |
with gr.Row():
|
| 87 |
with gr.Column():
|
| 88 |
exemplar_img = gr.Image(
|
| 89 |
-
label='Exemplar
|
| 90 |
type='pil',
|
| 91 |
interaction=False
|
| 92 |
)
|
|
@@ -103,11 +103,11 @@ def create_inference_demo(func: inference_fn) -> gr.Blocks:
|
|
| 103 |
]
|
| 104 |
)
|
| 105 |
|
| 106 |
-
model_id = gr.Dropdown(
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
prompt = gr.Textbox(
|
| 112 |
label='Prompt',
|
| 113 |
max_lines=1,
|
|
|
|
| 49 |
'''
|
| 50 |
DETAILDESCRIPTION='''
|
| 51 |
We propose a new task, **Relation Inversion**: Given a few exemplar images, where a relation co-exists in every image, we aim to find a relation prompt **\<R>** to capture this interaction, and apply the relation to new entities to synthesize new scenes.
|
| 52 |
+
Here we give several pre-trained relation prompts for you to play with. You can choose a set of exemplar images from the examples, and use **\<R>** in your prompt for relation-specific text-to-image generation.
|
| 53 |
'''
|
| 54 |
|
| 55 |
|
|
|
|
| 86 |
with gr.Row():
|
| 87 |
with gr.Column():
|
| 88 |
exemplar_img = gr.Image(
|
| 89 |
+
label='Exemplar Images',
|
| 90 |
type='pil',
|
| 91 |
interaction=False
|
| 92 |
)
|
|
|
|
| 103 |
]
|
| 104 |
)
|
| 105 |
|
| 106 |
+
# model_id = gr.Dropdown(
|
| 107 |
+
# choices=['painted_on', 'carved_by', 'inside'],
|
| 108 |
+
# value='painted_on',
|
| 109 |
+
# label='Relation',
|
| 110 |
+
# visible=True)
|
| 111 |
prompt = gr.Textbox(
|
| 112 |
label='Prompt',
|
| 113 |
max_lines=1,
|
exemplars/carved_by.jpg
CHANGED
|
|
exemplars/inside.jpg
CHANGED
|
|
exemplars/painted_on.jpg
CHANGED
|
|