loubnabnl HF staff commited on
Commit
3bce3fb
β€’
1 Parent(s): c3214e3

update app

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, set_seed
3
  from transformers import pipeline
4
  import torch
5
  import json
6
-
7
 
8
  @st.cache(allow_output_mutation=True)
9
  def load_tokenizer(model_ckpt):
@@ -59,16 +59,19 @@ set_seed(42)
59
  gen_kwargs = {}
60
 
61
  if selected_task == " ":
62
- st.title("Code Generation Models comparison πŸ’»")
63
  with open("intro.txt", "r") as f:
64
  intro = f.read()
65
  st.markdown(intro)
66
  elif selected_task == "Pretraining dataset":
67
  st.title("Pretraining datasets πŸ“š")
 
 
 
68
  for model in selected_models:
69
  with open(f"datasets/{model.lower()}.txt", "r") as f:
70
  text = f.read()
71
- st.markdown(f"## {model}:")
72
  st.markdown(text)
73
  elif selected_task == "Model architecture":
74
  st.title("Model architecture πŸ”¨")
 
3
  from transformers import pipeline
4
  import torch
5
  import json
6
+ import pandas as pd
7
 
8
  @st.cache(allow_output_mutation=True)
9
  def load_tokenizer(model_ckpt):
 
59
  gen_kwargs = {}
60
 
61
  if selected_task == " ":
62
+ st.title("Code Generation Models comparison")
63
  with open("intro.txt", "r") as f:
64
  intro = f.read()
65
  st.markdown(intro)
66
  elif selected_task == "Pretraining dataset":
67
  st.title("Pretraining datasets πŸ“š")
68
+ st.Markdown("Preview of some code files from Github repositories")
69
+ df = pd.read_csv("preview-github-data.csv")
70
+ st.dataframe(df)
71
  for model in selected_models:
72
  with open(f"datasets/{model.lower()}.txt", "r") as f:
73
  text = f.read()
74
+ st.markdown(f"### {model}:")
75
  st.markdown(text)
76
  elif selected_task == "Model architecture":
77
  st.title("Model architecture πŸ”¨")