Spaces:
Runtime error
Runtime error
File size: 1,011 Bytes
d7e4f1f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import streamlit as st
from model.generate import generate_names
col1, col2, col3 = st.columns([1,1,1])
st.markdown('''This is a simple MLP that predicts the next character given the context of the previous 5 characters!
If you want to play with this, see the repo [here](https://github.com/BodaSadalla98/Arabic_makemore)
''')
option = col2.selectbox(
'Select the language to generate the names with:',
('Arabic', 'English'))
number = col2.number_input(label='Enter how many names to generate..', min_value=0, max_value=1000, value=5)
names = ''
if col2.button('Generate'):
if option =='English':
names = generate_names(number,'en')
else:
names = generate_names(number,'ar')
for name in names:
new_title = f'<p style="font-family:sans-serif;text-align: center; color:Purple; font-size: 30px;">{name}</p>'
col2.markdown(new_title, unsafe_allow_html=True)
st.markdown('''
If you have any questions, contact me: **@bodasadallah**
''')
# st.write(names)
|