Add application file
Browse files
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 |
-
|
15 |
-
|
16 |
|
17 |
-
x = st.slider('Select a sample', 0, 1000,
|
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 |
|