yash161101 commited on
Commit
f29b441
1 Parent(s): ca94011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
-
3
  import tensorflow as tf
4
  config = tf.compat.v1.ConfigProto(intra_op_parallelism_threads=3,
5
  inter_op_parallelism_threads=2,
@@ -25,8 +25,8 @@ if st.button('Submit'):
25
  #get transformers
26
  from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
27
 
28
- tokenizer = GPT2Tokenizer.from_pretrained("gpt-2")
29
- GPT2 = TFGPT2LMHeadModel.from_pretrained("gpt-2", pad_token_id=tokenizer.eos_token_id)
30
 
31
  import tensorflow as tf
32
  tf.random.set_seed(SEED)
 
1
  import streamlit as st
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import tensorflow as tf
4
  config = tf.compat.v1.ConfigProto(intra_op_parallelism_threads=3,
5
  inter_op_parallelism_threads=2,
 
25
  #get transformers
26
  from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
27
 
28
+ tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
29
+ GPT2 = model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
30
 
31
  import tensorflow as tf
32
  tf.random.set_seed(SEED)