Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -222,16 +222,21 @@ with gr.Blocks(title="CuMo", theme=gr.themes.Default(), css=block_css) as demo:
|
|
222 |
|
223 |
#cur_dir = os.path.dirname(os.path.abspath(__file__))
|
224 |
cur_dir = './cumo/serve'
|
|
|
225 |
gr.Examples(examples=[
|
226 |
-
[f"{cur_dir}/examples/
|
227 |
-
[f"{cur_dir}/examples/
|
228 |
-
[f"{cur_dir}/examples/
|
229 |
-
[f"{cur_dir}/examples/
|
230 |
-
[f"{cur_dir}/examples/
|
231 |
-
[f"{cur_dir}/examples/
|
232 |
-
[f"{cur_dir}/examples/
|
|
|
|
|
|
|
233 |
], inputs=[imagebox, textbox], cache_examples=False)
|
234 |
|
|
|
235 |
with gr.Accordion("Parameters", open=False) as parameter_row:
|
236 |
temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature",)
|
237 |
top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, interactive=True, label="Top P",)
|
|
|
222 |
|
223 |
#cur_dir = os.path.dirname(os.path.abspath(__file__))
|
224 |
cur_dir = './cumo/serve'
|
225 |
+
default_prompt = "What material is this item and how to dispose of it?"
|
226 |
gr.Examples(examples=[
|
227 |
+
[f"{cur_dir}/examples/0165_CB.jpg", default_prompt],
|
228 |
+
[f"{cur_dir}/examples/0225_PA.jpg", default_prompt],
|
229 |
+
[f"{cur_dir}/examples/0787_GM.jpg", default_prompt],
|
230 |
+
[f"{cur_dir}/examples/1396_A.jpg", default_prompt],
|
231 |
+
[f"{cur_dir}/examples/2001_P.jpg", default_prompt],
|
232 |
+
[f"{cur_dir}/examples/2658_PE.jpg", default_prompt],
|
233 |
+
[f"{cur_dir}/examples/3113_R.jpg", default_prompt],
|
234 |
+
[f"{cur_dir}/examples/3750_RPC.jpg", default_prompt],
|
235 |
+
[f"{cur_dir}/examples/5033_CC.jpg", default_prompt],
|
236 |
+
[f"{cur_dir}/examples/5307_B.jpg", default_prompt],
|
237 |
], inputs=[imagebox, textbox], cache_examples=False)
|
238 |
|
239 |
+
|
240 |
with gr.Accordion("Parameters", open=False) as parameter_row:
|
241 |
temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature",)
|
242 |
top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, interactive=True, label="Top P",)
|