Update app.py
Browse files
app.py
CHANGED
@@ -107,8 +107,8 @@ def main():
|
|
107 |
st.success(TextBlob(text).correct())
|
108 |
if st.checkbox("Text Generation"):
|
109 |
ok = st.button("Generate")
|
110 |
-
tokenizer, model = load_models()
|
111 |
if ok:
|
|
|
112 |
input_ids = tokenizer(text, return_tensors='pt').input_ids
|
113 |
st.text("Using Hugging Face Transformer, Contrastive Search ..")
|
114 |
output = model.generate(input_ids, max_length=128)
|
|
|
107 |
st.success(TextBlob(text).correct())
|
108 |
if st.checkbox("Text Generation"):
|
109 |
ok = st.button("Generate")
|
|
|
110 |
if ok:
|
111 |
+
tokenizer, model = load_models()
|
112 |
input_ids = tokenizer(text, return_tensors='pt').input_ids
|
113 |
st.text("Using Hugging Face Transformer, Contrastive Search ..")
|
114 |
output = model.generate(input_ids, max_length=128)
|