Spaces:
Running
on
Zero
Running
on
Zero
bugfix
Browse files
app.py
CHANGED
@@ -76,20 +76,29 @@ with gr.Blocks() as demo:
|
|
76 |
'<DENSE_REGION_CAPTION>'
|
77 |
], value="<CAPTION_TO_PHRASE_GROUNDING>", label="Task Prompt", info="task prompts"
|
78 |
),
|
79 |
-
|
80 |
-
|
81 |
with gr.Column():
|
82 |
-
|
83 |
|
84 |
-
|
85 |
fn=process_image,
|
86 |
inputs=[
|
87 |
image,
|
88 |
task_prompt,
|
89 |
-
|
90 |
],
|
91 |
-
outputs=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
)
|
93 |
|
94 |
|
95 |
-
demo.launch(debug=
|
|
|
76 |
'<DENSE_REGION_CAPTION>'
|
77 |
], value="<CAPTION_TO_PHRASE_GROUNDING>", label="Task Prompt", info="task prompts"
|
78 |
),
|
79 |
+
text_prompt = gr.Textbox(label='Text prompt', placeholder='Enter text prompts')
|
80 |
+
submit_button = gr.Button(value='Submit', variant='primary')
|
81 |
with gr.Column():
|
82 |
+
image_gallery = gr.Gallery(label="Generated images")
|
83 |
|
84 |
+
text_prompt.sumbit(
|
85 |
fn=process_image,
|
86 |
inputs=[
|
87 |
image,
|
88 |
task_prompt,
|
89 |
+
text_prompt
|
90 |
],
|
91 |
+
outputs=image_gallery
|
92 |
+
)
|
93 |
+
submit_button.click(
|
94 |
+
fn=process_image,
|
95 |
+
inputs=[
|
96 |
+
image,
|
97 |
+
task_prompt,
|
98 |
+
text_prompt
|
99 |
+
],
|
100 |
+
outputs=image_gallery
|
101 |
)
|
102 |
|
103 |
|
104 |
+
demo.launch(debug=True, show_error=True)
|