yash161101 commited on
Commit
eed725f
1 Parent(s): e12550e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,9 +15,10 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
  @st.cache(allow_output_mutation=True)
16
  def get_model():
17
  tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
18
- model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
19
  return model, tokenizer
20
  #g =
 
21
  c = 5
22
  with st.form(key='my_form'):
23
  prompt = st.text_input('Enter sentence:', '')
 
15
  @st.cache(allow_output_mutation=True)
16
  def get_model():
17
  tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
18
+ model = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
19
  return model, tokenizer
20
  #g =
21
+ model, tokenizer = get_model()
22
  c = 5
23
  with st.form(key='my_form'):
24
  prompt = st.text_input('Enter sentence:', '')