loubnabnl HF staff commited on
Commit
99db140
1 Parent(s): 1d384f8
Files changed (1) hide show
  1. app.py +22 -6
app.py CHANGED
@@ -10,7 +10,7 @@ GITHUB_CODE = "https://huggingface.co/datasets/lvwerra/github-code"
10
  INCODER_IMG = (
11
  "https://huggingface.co/datasets/loubnabnl/repo-images/raw/main/incoder.png"
12
  )
13
- MODELS = ["CodeParrot", "InCoder"]
14
 
15
  @st.cache()
16
  def load_examples():
@@ -32,9 +32,25 @@ def generate_code(model_name, gen_prompt, max_new_tokens, temperature, seed):
32
 
33
  st.set_page_config(page_icon=":laptop:", layout="wide")
34
 
35
- # Introduction
36
- st.title("Code generation with 🤗")
37
- with open("utils/intro.txt", "r") as f:
38
- intro = f.read()
39
- st.markdown(intro)
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  INCODER_IMG = (
11
  "https://huggingface.co/datasets/loubnabnl/repo-images/raw/main/incoder.png"
12
  )
13
+
14
 
15
  @st.cache()
16
  def load_examples():
 
32
 
33
  st.set_page_config(page_icon=":laptop:", layout="wide")
34
 
35
+ st.sidebar.header("Models")
36
+ models = ["CodeParrot", "InCoder"]
37
+ selected_models = st.sidebar.multiselect(
38
+ "Select code generation models to compare", models, default=["CodeParrot"]
39
+ )
40
 
41
+ st.sidebar.header("Tasks")
42
+ tasks = [
43
+ " ",
44
+ "Pretraining datasets",
45
+ "Model architecture",
46
+ "Model evaluation",
47
+ "Code generation",
48
+ ]
49
+ selected_task = st.sidebar.selectbox("Select a task", tasks)
50
+
51
+
52
+ if selected_task == " ":
53
+ st.title("Code Generation Models")
54
+ with open("utils/intro.txt", "r") as f:
55
+ intro = f.read()
56
+ st.markdown(intro)