Spaces:
Running on Zero
Running on Zero
fix: replace PCB with pcb3 (clearer defect), Run Long to 60s
Browse files- app.py +2 -2
- examples/pcb_defect.jpg +0 -0
- examples/pcb_good.jpg +0 -0
app.py
CHANGED
|
@@ -212,7 +212,7 @@ def _predict_gpu(reference_image, test_image, prompt, max_new_tokens, _t_enter=N
|
|
| 212 |
return _run_inference(reference_image, test_image, prompt, max_new_tokens, _t_enter=_t_enter)
|
| 213 |
|
| 214 |
|
| 215 |
-
@spaces.GPU(duration=
|
| 216 |
def _predict_long_gpu(reference_image, test_image, prompt, max_new_tokens, _t_enter=None):
|
| 217 |
return _run_inference(reference_image, test_image, prompt, max_new_tokens, _t_enter=_t_enter)
|
| 218 |
|
|
@@ -314,7 +314,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title=TITLE) as demo:
|
|
| 314 |
label="Max New Tokens",
|
| 315 |
)
|
| 316 |
run_btn = gr.Button("Run (15s)", variant="primary", scale=2)
|
| 317 |
-
run_long_btn = gr.Button("Run Long (
|
| 318 |
|
| 319 |
output = gr.Textbox(label="Model Output", lines=4)
|
| 320 |
vis_output = gr.Image(label="Detection Visualization")
|
|
|
|
| 212 |
return _run_inference(reference_image, test_image, prompt, max_new_tokens, _t_enter=_t_enter)
|
| 213 |
|
| 214 |
|
| 215 |
+
@spaces.GPU(duration=60)
|
| 216 |
def _predict_long_gpu(reference_image, test_image, prompt, max_new_tokens, _t_enter=None):
|
| 217 |
return _run_inference(reference_image, test_image, prompt, max_new_tokens, _t_enter=_t_enter)
|
| 218 |
|
|
|
|
| 314 |
label="Max New Tokens",
|
| 315 |
)
|
| 316 |
run_btn = gr.Button("Run (15s)", variant="primary", scale=2)
|
| 317 |
+
run_long_btn = gr.Button("Run Long (60s)", variant="secondary", scale=1)
|
| 318 |
|
| 319 |
output = gr.Textbox(label="Model Output", lines=4)
|
| 320 |
vis_output = gr.Image(label="Detection Visualization")
|
examples/pcb_defect.jpg
CHANGED
|
|
examples/pcb_good.jpg
CHANGED
|
|