jordyvl commited on
Commit
6be2dfa
1 Parent(s): 6c0ff19

small diagnostic categories fix

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -90,8 +90,8 @@ if os.path.exists(DIAGNOSTIC_PATH):
90
  "operation_normalization",
91
  "type_abstractive",
92
  "type_extractive",
93
- "num_pages",
94
- "num_tokens",
95
  ]
96
  # DIAGNOSTIC_TEST = DIAGNOSTIC_TEST[interest_cols + ["row_hash"]]
97
 
@@ -196,7 +196,7 @@ def main(complexity, evidence, form, operation, type):
196
  return f"No results found for query {query}", "", "", ""
197
 
198
  for i, sample in results.sample(frac=1).iterrows():
199
- print("Sampled: ", sample)
200
 
201
  # first get PDF file
202
  PDF, grid = None, None
@@ -218,8 +218,7 @@ def main(complexity, evidence, form, operation, type):
218
 
219
 
220
  # test
221
- q, a, d, im, f = main(*slider_defaults)
222
-
223
 
224
  outputs = [
225
  gr.Textbox(label="question"),
@@ -230,4 +229,4 @@ outputs = [
230
  ]
231
 
232
  iface = gr.Interface(fn=main, inputs=sliders, outputs=outputs, description="Visualize diagnostic samples from DUDE")
233
- iface.launch(share=False)
 
90
  "operation_normalization",
91
  "type_abstractive",
92
  "type_extractive",
93
+ # "num_pages",
94
+ # "num_tokens",
95
  ]
96
  # DIAGNOSTIC_TEST = DIAGNOSTIC_TEST[interest_cols + ["row_hash"]]
97
 
 
196
  return f"No results found for query {query}", "", "", ""
197
 
198
  for i, sample in results.sample(frac=1).iterrows():
199
+ print("Sampled: ", sample['nhash'])
200
 
201
  # first get PDF file
202
  PDF, grid = None, None
 
218
 
219
 
220
  # test
221
+ #q, a, d, im, f = main(*slider_defaults)
 
222
 
223
  outputs = [
224
  gr.Textbox(label="question"),
 
229
  ]
230
 
231
  iface = gr.Interface(fn=main, inputs=sliders, outputs=outputs, description="Visualize diagnostic samples from DUDE")
232
+ iface.launch(share=True)