jordyvl commited on
Commit
96f0e2c
·
1 Parent(s): 6720717

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -145,14 +145,21 @@ _CLASSES = [
145
  # test
146
  # l, im, f = main(*slider_defaults)
147
 
148
- #load both datasets in memory? --> easier retrieval
 
 
 
 
 
 
 
 
149
 
150
  meta_cats = {'dataset': ['rvl_cdip', 'rvl_cdip_N'],
151
  'label': _CLASSES
152
  }
153
  sliders = [gr.Dropdown(choices=choices, value=choices[-1], label=label) for label, choices in meta_cats.items()]
154
- slider_defaults = [None, "visual_checkbox", None, None, None] # [slider.value for slider in sliders]
155
-
156
 
157
  outputs = [
158
  gr.Textbox(label="label"),
 
145
  # test
146
  # l, im, f = main(*slider_defaults)
147
 
148
+ #load both datasets in memory? --> easier retrieval afterwards with seed index based on pressing button
149
+ DATASETS = {
150
+ 'rvl_cdip': load_dataset(
151
+ "bdpc/rvl_cdip_mp",
152
+ split="test"),
153
+ 'rvl_cdip_N': load_dataset(
154
+ "bdpc/rvl_cdip_mp",
155
+ split="test")
156
+ }
157
 
158
  meta_cats = {'dataset': ['rvl_cdip', 'rvl_cdip_N'],
159
  'label': _CLASSES
160
  }
161
  sliders = [gr.Dropdown(choices=choices, value=choices[-1], label=label) for label, choices in meta_cats.items()]
162
+ slider_defaults = [slider.value for slider in sliders]
 
163
 
164
  outputs = [
165
  gr.Textbox(label="label"),