Spaces:
Runtime error
Runtime error
move examples
Browse files
app.py
CHANGED
|
@@ -136,6 +136,20 @@ with gr.Blocks(css=css) as demo:
|
|
| 136 |
type = "filepath",
|
| 137 |
elem_id = "image-in"
|
| 138 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
cap_type = gr.Radio(
|
| 140 |
label = "Caption type",
|
| 141 |
choices = [
|
|
@@ -155,21 +169,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 155 |
lines = 6,
|
| 156 |
max_lines = 30,
|
| 157 |
elem_id = "suggested-system-prompt"
|
| 158 |
-
)
|
| 159 |
-
with gr.Row():
|
| 160 |
-
gr.Examples(
|
| 161 |
-
examples = [
|
| 162 |
-
["examples/monalisa.png"],
|
| 163 |
-
["examples/santa.png"],
|
| 164 |
-
["examples/ocean_poet.jpeg"],
|
| 165 |
-
["examples/winter_hiking.png"],
|
| 166 |
-
["examples/teatime.jpeg"],
|
| 167 |
-
["examples/news_experts.jpeg"],
|
| 168 |
-
["examples/chicken_adobo.jpeg"]
|
| 169 |
-
],
|
| 170 |
-
fn = infer,
|
| 171 |
-
inputs = [image_in, cap_type]
|
| 172 |
-
)
|
| 173 |
|
| 174 |
submit_btn.click(
|
| 175 |
fn = infer,
|
|
|
|
| 136 |
type = "filepath",
|
| 137 |
elem_id = "image-in"
|
| 138 |
)
|
| 139 |
+
gr.Examples(
|
| 140 |
+
examples = [
|
| 141 |
+
["examples/monalisa.png"],
|
| 142 |
+
["examples/santa.png"],
|
| 143 |
+
["examples/ocean_poet.jpeg"],
|
| 144 |
+
["examples/winter_hiking.png"],
|
| 145 |
+
["examples/teatime.jpeg"],
|
| 146 |
+
["examples/news_experts.jpeg"],
|
| 147 |
+
["examples/chicken_adobo.jpeg"]
|
| 148 |
+
],
|
| 149 |
+
fn = infer,
|
| 150 |
+
inputs = [image_in, cap_type],
|
| 151 |
+
examples_per_page=4
|
| 152 |
+
)
|
| 153 |
cap_type = gr.Radio(
|
| 154 |
label = "Caption type",
|
| 155 |
choices = [
|
|
|
|
| 169 |
lines = 6,
|
| 170 |
max_lines = 30,
|
| 171 |
elem_id = "suggested-system-prompt"
|
| 172 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
submit_btn.click(
|
| 175 |
fn = infer,
|