Spaces:
Sleeping
Sleeping
Reformatting, remove TODO.
Browse files- app.py +6 -5
- big_vision_contrastive_models.py +1 -1
app.py
CHANGED
@@ -181,7 +181,8 @@ def create_app():
|
|
181 |
label='Prompts (press Shift-ENTER to add a prompt)')
|
182 |
with gr.Row():
|
183 |
|
184 |
-
family = gr.Dropdown(
|
|
|
185 |
|
186 |
make_variant = functools.partial(gr.Dropdown, label='Variant')
|
187 |
variant = make_variant(list(MODEL_MAP['lit']), value='B/16')
|
@@ -221,10 +222,10 @@ def create_app():
|
|
221 |
]
|
222 |
|
223 |
gr.on(
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
)
|
229 |
|
230 |
# (end of code for reactive UI)
|
|
|
181 |
label='Prompts (press Shift-ENTER to add a prompt)')
|
182 |
with gr.Row():
|
183 |
|
184 |
+
family = gr.Dropdown(
|
185 |
+
value='lit', choices=list(MODEL_MAP), label='Model family')
|
186 |
|
187 |
make_variant = functools.partial(gr.Dropdown, label='Variant')
|
188 |
variant = make_variant(list(MODEL_MAP['lit']), value='B/16')
|
|
|
222 |
]
|
223 |
|
224 |
gr.on(
|
225 |
+
[family.change, variant.change, res.change],
|
226 |
+
update_inputs,
|
227 |
+
[family, variant, res],
|
228 |
+
[variant, res, bias],
|
229 |
)
|
230 |
|
231 |
# (end of code for reactive UI)
|
big_vision_contrastive_models.py
CHANGED
@@ -211,7 +211,7 @@ def load_model(config, check_params=False):
|
|
211 |
assert isinstance(config, ContrastiveModelConfig), type(config)
|
212 |
|
213 |
cfg = ml_collections.ConfigDict()
|
214 |
-
cfg.image_model = 'vit'
|
215 |
if config.family == ContrastiveModelFamily.LIT:
|
216 |
cfg.text_model = 'proj.flaxformer.bert'
|
217 |
cfg.image = dict(
|
|
|
211 |
assert isinstance(config, ContrastiveModelConfig), type(config)
|
212 |
|
213 |
cfg = ml_collections.ConfigDict()
|
214 |
+
cfg.image_model = 'vit'
|
215 |
if config.family == ContrastiveModelFamily.LIT:
|
216 |
cfg.text_model = 'proj.flaxformer.bert'
|
217 |
cfg.image = dict(
|