Elfsong commited on
Commit
7bdce7c
1 Parent(s): 843912e
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +2 -0
app.py CHANGED
@@ -4,6 +4,7 @@
4
 
5
  import uuid
6
  import streamlit as st
 
7
  from code_editor import code_editor
8
  from datasets import load_dataset, Dataset
9
 
@@ -37,7 +38,7 @@ candidates_dict = {}
37
  for candidate in candidates:
38
  candidate_name = str(candidate['question_id']) + '.' + str(candidate['name']) + ' [' + str(candidate['difficulty']).upper() + ']'
39
  candidates_dict[candidate_name] = candidate
40
- option = st.selectbox("Select a problem here", candidates_dict.keys())
41
  example = candidates_dict[option]
42
 
43
  tab1, tab2, tab3 = st.tabs(["Problem Description", "Canonical Solution", "Test Cases Generator"])
 
4
 
5
  import uuid
6
  import streamlit as st
7
+ import streamlit_ext as ste
8
  from code_editor import code_editor
9
  from datasets import load_dataset, Dataset
10
 
 
38
  for candidate in candidates:
39
  candidate_name = str(candidate['question_id']) + '.' + str(candidate['name']) + ' [' + str(candidate['difficulty']).upper() + ']'
40
  candidates_dict[candidate_name] = candidate
41
+ option = ste.selectbox("Select a problem here", candidates_dict.keys())
42
  example = candidates_dict[option]
43
 
44
  tab1, tab2, tab3 = st.tabs(["Problem Description", "Canonical Solution", "Test Cases Generator"])
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ streamlit_code_editor
2
+ streamlit_ext