xu3kev commited on
Commit
94d1d62
1 Parent(s): 3231898

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -3,17 +3,17 @@ import json
3
  from datasets import load_dataset
4
  import sqlparse
5
 
6
- st.set_page_config(page_title="BIRD SQL inspection", layout="wide")
7
 
8
  st.markdown("<h1 style='text-align: center; color: #00BFFF;'>BIRD SQL inspection 🔍</h1>", unsafe_allow_html=True)
9
 
10
  st.markdown("""
11
- Here you can inspect BIRD SQL data with schemas from [BIRD-Bench](https://bird-bench.github.io/).
12
  """)
13
 
14
  @st.cache()
15
  def load_data():
16
- ds = load_dataset("xu3kev/BIRD-SQL-data", split="train")
17
  return ds
18
 
19
 
@@ -21,12 +21,15 @@ samples = load_data()
21
  st.sidebar.header('Sample Selection')
22
  index_example = st.sidebar.number_input(f"Choose a sample from the existing {len(samples)} notebooks:", min_value=0, max_value=max(0, len(samples)-1), value=0, step=1)
23
 
24
- db_id = samples[index_example]["db_id"]
25
- st.markdown(f'<h2 style="color:blue;">{index_example} Question:</h2>', unsafe_allow_html=True)
26
- st.code(samples[index_example]["question"])
27
- sql_str = samples[index_example]["SQL"]
28
- sql_str_pretty = sqlparse.format(sql_str, reindent=True, keyword_case='upper')
29
- st.markdown(f'<h2 style="color:blue;">SQL:</h2>', unsafe_allow_html=True)
30
- st.code(sql_str_pretty)
31
- st.markdown(f'<h2 style="color:blue;">Database schema:</h2>', unsafe_allow_html=True)
32
- st.code(samples[index_example]["schema"])
 
 
 
 
3
  from datasets import load_dataset
4
  import sqlparse
5
 
6
+ st.set_page_config(page_title="Proofsteps from Proof-Pile-V2", layout="wide")
7
 
8
  st.markdown("<h1 style='text-align: center; color: #00BFFF;'>BIRD SQL inspection 🔍</h1>", unsafe_allow_html=True)
9
 
10
  st.markdown("""
11
+ Here you can inspect proofsteps from [Proof-Pile-V2](https://huggingface.co/datasets/EleutherAI/proof-pile-2).
12
  """)
13
 
14
  @st.cache()
15
  def load_data():
16
+ ds = load_dataset("xu3kev/proof-pile-2-proofsteps", split="lean_proofsteps")
17
  return ds
18
 
19
 
 
21
  st.sidebar.header('Sample Selection')
22
  index_example = st.sidebar.number_input(f"Choose a sample from the existing {len(samples)} notebooks:", min_value=0, max_value=max(0, len(samples)-1), value=0, step=1)
23
 
24
+ #db_id = samples[index_example]["db_id"]
25
+ #st.markdown(f'<h2 style="color:blue;">{index_example} Question:</h2>', unsafe_allow_html=True)
26
+ #st.code(samples[index_example]["question"])
27
+ #sql_str = samples[index_example]["SQL"]
28
+ #sql_str_pretty = sqlparse.format(sql_str, reindent=True, keyword_case='upper')
29
+ #st.markdown(f'<h2 style="color:blue;">SQL:</h2>', unsafe_allow_html=True)
30
+ #st.code(sql_str_pretty)
31
+ st.markdown(f'<h2 style="color:blue;">Content:</h2>', unsafe_allow_html=True)
32
+ st.code(samples[index_example]["text"])
33
+ st.markdown(f'<h2 style="color:blue;">Metadata:</h2>', unsafe_allow_html=True)
34
+ st.code(samples[index_example]["meta"])
35
+