red1xe commited on
Commit
9b2bdb3
1 Parent(s): b7b2ce3

Add application file

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,10 +11,10 @@ st.title('Code Generation')
11
  huggingface_dataset_name = "red1xe/code_instructions"
12
  dataset = load_dataset(huggingface_dataset_name)
13
  model_name='gpt2'
14
- original_model = AutoModelForCausalLM.from_pretrained(model_name)
15
- tokenizer = AutoTokenizer.from_pretrained(model_name)
16
 
17
- x = st.slider('Select a sample', 0, 1000, 200)
18
  if st.button("Show Sample"):
19
  index = x
20
 
 
11
  huggingface_dataset_name = "red1xe/code_instructions"
12
  dataset = load_dataset(huggingface_dataset_name)
13
  model_name='gpt2'
14
+ tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder")
15
+ original_model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder")
16
 
17
+ x = st.slider(label='Select a sample', min_value=0, max_value=1000, value=500, step=10)
18
  if st.button("Show Sample"):
19
  index = x
20