OSainz commited on
Commit
5945c23
β€’
1 Parent(s): 11def42

Style + gitignore

Browse files
Files changed (2) hide show
  1. .gitignore +2 -0
  2. app.py +5 -2
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *.pyc
2
+ *.json
app.py CHANGED
@@ -38,7 +38,9 @@ def filter_dataframe(dataframe, eval_dataset, cont_source, checkboxes):
38
  | (dataframe["Test Split"] > 0.0)
39
  ]
40
 
41
- return dataframe
 
 
42
 
43
 
44
  def filter_dataframe_corpus(*args, **kwargs) -> pd.DataFrame:
@@ -85,6 +87,7 @@ with gr.Blocks(
85
  theme=theme,
86
  title="πŸ’¨ Data Contamination Report",
87
  analytics_enabled=False,
 
88
  ) as demo:
89
  gr.Markdown(PANEL_MARKDOWN)
90
  with gr.Tab("Corpus contamination") as tab_corpus:
@@ -112,7 +115,7 @@ with gr.Blocks(
112
  corpus_dataframe = gr.DataFrame(
113
  value=filter_dataframe_corpus(
114
  eval_dataset_corpus, cont_corpora, checkboxes_corpus
115
- ).style.format(precision=2),
116
  headers=df.columns.to_list(),
117
  datatype=[
118
  "markdown",
 
38
  | (dataframe["Test Split"] > 0.0)
39
  ]
40
 
41
+ return dataframe.style.format(
42
+ {"Train Split": "{:.1%}", "Development Split": "{:.1%}", "Test Split": "{:.1%}"}
43
+ )
44
 
45
 
46
  def filter_dataframe_corpus(*args, **kwargs) -> pd.DataFrame:
 
87
  theme=theme,
88
  title="πŸ’¨ Data Contamination Report",
89
  analytics_enabled=False,
90
+ fill_height=True,
91
  ) as demo:
92
  gr.Markdown(PANEL_MARKDOWN)
93
  with gr.Tab("Corpus contamination") as tab_corpus:
 
115
  corpus_dataframe = gr.DataFrame(
116
  value=filter_dataframe_corpus(
117
  eval_dataset_corpus, cont_corpora, checkboxes_corpus
118
+ ),
119
  headers=df.columns.to_list(),
120
  datatype=[
121
  "markdown",