Spaces:
Runtime error
Runtime error
yash161101
commited on
Commit
•
2fb602c
1
Parent(s):
ceafc2c
Update app.py
Browse files
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 |
-
|
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(
|
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 |
|