Spaces:
Sleeping
Sleeping
Final test
Browse files- app_caption.py +2 -1
- app_vqa.py +2 -1
- prismer_model.py +3 -3
app_caption.py
CHANGED
@@ -37,7 +37,8 @@ def create_demo() -> gr.Blocks:
|
|
37 |
gr.Examples(examples=examples,
|
38 |
inputs=inputs,
|
39 |
outputs=outputs,
|
40 |
-
fn=model.run_caption
|
|
|
41 |
|
42 |
run_button.click(fn=model.run_caption, inputs=inputs, outputs=outputs)
|
43 |
return demo
|
|
|
37 |
gr.Examples(examples=examples,
|
38 |
inputs=inputs,
|
39 |
outputs=outputs,
|
40 |
+
fn=model.run_caption,
|
41 |
+
cache_examples=os.getenv('SYSTEM') == 'spaces')
|
42 |
|
43 |
run_button.click(fn=model.run_caption, inputs=inputs, outputs=outputs)
|
44 |
return demo
|
app_vqa.py
CHANGED
@@ -42,7 +42,8 @@ def create_demo() -> gr.Blocks:
|
|
42 |
gr.Examples(examples=examples,
|
43 |
inputs=inputs,
|
44 |
outputs=outputs,
|
45 |
-
fn=model.run_vqa
|
|
|
46 |
|
47 |
run_button.click(fn=model.run_vqa, inputs=inputs, outputs=outputs)
|
48 |
return demo
|
|
|
42 |
gr.Examples(examples=examples,
|
43 |
inputs=inputs,
|
44 |
outputs=outputs,
|
45 |
+
fn=model.run_vqa,
|
46 |
+
cache_examples=os.getenv('SYSTEM') == 'spaces')
|
47 |
|
48 |
run_button.click(fn=model.run_vqa, inputs=inputs, outputs=outputs)
|
49 |
return demo
|
prismer_model.py
CHANGED
@@ -34,10 +34,10 @@ def download_models() -> None:
|
|
34 |
subprocess.run(shlex.split('python download_checkpoints.py --download_experts=True'), cwd='prismer')
|
35 |
|
36 |
model_names = [
|
37 |
-
|
38 |
-
|
39 |
'pretrain_prismer_base',
|
40 |
-
|
41 |
]
|
42 |
for model_name in model_names:
|
43 |
if pathlib.Path(f'prismer/logging/{model_name}').exists():
|
|
|
34 |
subprocess.run(shlex.split('python download_checkpoints.py --download_experts=True'), cwd='prismer')
|
35 |
|
36 |
model_names = [
|
37 |
+
'vqa_prismer_base',
|
38 |
+
'vqa_prismer_large',
|
39 |
'pretrain_prismer_base',
|
40 |
+
'pretrain_prismer_large',
|
41 |
]
|
42 |
for model_name in model_names:
|
43 |
if pathlib.Path(f'prismer/logging/{model_name}').exists():
|