Spaces:
Runtime error
Runtime error
yash161101
commited on
Commit
•
f29b441
1
Parent(s):
ca94011
Update app.py
Browse files
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 =
|
29 |
-
GPT2 =
|
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)
|