jhon parra
commited on
Commit
路
1457ccb
1
Parent(s):
6576e07
updated font color
Browse files
app.py
CHANGED
@@ -22,9 +22,9 @@ def text_completion(tokenizer,model,input_text:str,max_len:int=100):
|
|
22 |
return out_text
|
23 |
|
24 |
|
25 |
-
st.markdown("<h3 style='text-align: center; color:
|
26 |
st.text("")
|
27 |
-
st.markdown("<
|
28 |
st.text("")
|
29 |
|
30 |
|
@@ -50,8 +50,8 @@ with col2:
|
|
50 |
if go_button: ##avoid re running script
|
51 |
with st.spinner('Generating Text...'):
|
52 |
output_text=text_completion(MODELS[politician.lower()]['tokenizer'],MODELS[politician.lower()]['model'],input_user_text,max_length_text)
|
53 |
-
st.text_area("
|
54 |
else:
|
55 |
-
st.text_area("
|
56 |
|
57 |
|
|
|
22 |
return out_text
|
23 |
|
24 |
|
25 |
+
st.markdown("<h3 style='text-align: center; color: gray;'> 🐦 Tweet de Pol铆tico Colombiano: Autocompletado/generaci贸n de texto a partir de GPT2</h3>", unsafe_allow_html=True)
|
26 |
st.text("")
|
27 |
+
st.markdown("<h5 style='text-align: center; color: gray;'>Causal Language Modeling, source code <a href='https://github.com/statscol/twitter-user-autocomplete-assistant'> here </a> </h5>", unsafe_allow_html=True)
|
28 |
st.text("")
|
29 |
|
30 |
|
|
|
50 |
if go_button: ##avoid re running script
|
51 |
with st.spinner('Generating Text...'):
|
52 |
output_text=text_completion(MODELS[politician.lower()]['tokenizer'],MODELS[politician.lower()]['model'],input_user_text,max_length_text)
|
53 |
+
st.text_area("Tweet:",output_text,height=380,key="output_text")
|
54 |
else:
|
55 |
+
st.text_area("Tweet:","",height=380,key="output_text")
|
56 |
|
57 |
|