red1xe commited on
Commit
027e5f3
·
1 Parent(s): 85c4439

Add application file

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -10,12 +10,9 @@ import streamlit as st
10
  st.title('Code Generation')
11
  huggingface_dataset_name = "red1xe/code_instructions"
12
  dataset = load_dataset(huggingface_dataset_name)
13
-
14
- if st.button("Load Model"):
15
- with st.spinner('Loading Model...'):
16
- model_name='google/flan-t5-base'
17
- original_model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
18
- tokenizer = AutoTokenizer.from_pretrained(model_name)
19
 
20
  x = st.slider('Select a sample', 0, 1000, 200)
21
  if st.button("Show Sample"):
 
10
  st.title('Code Generation')
11
  huggingface_dataset_name = "red1xe/code_instructions"
12
  dataset = load_dataset(huggingface_dataset_name)
13
+ model_name='google/flan-t5-base'
14
+ original_model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
15
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
 
 
 
16
 
17
  x = st.slider('Select a sample', 0, 1000, 200)
18
  if st.button("Show Sample"):