yash161101 commited on
Commit
2fb602c
1 Parent(s): ceafc2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ if st.button('Submit'):
20
  from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
21
 
22
  tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
23
- GPT2 = model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
24
  tf.random.set_seed(SEED)
25
 
26
  input_ids = tokenizer.encode(input_sequence, return_tensors='tf')
@@ -30,7 +30,7 @@ if st.button('Submit'):
30
  outputs = model(**inputs)
31
 
32
  print("Output:\n" + 100 * '-')
33
- print(tokenizer.decode(outputs[0], skip_special_tokens = True))
34
  else:
35
  st.write(' ')
36
 
 
20
  from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
21
 
22
  tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
23
+ model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
24
  tf.random.set_seed(SEED)
25
 
26
  input_ids = tokenizer.encode(input_sequence, return_tensors='tf')
 
30
  outputs = model(**inputs)
31
 
32
  print("Output:\n" + 100 * '-')
33
+ print(outputs)
34
  else:
35
  st.write(' ')
36