| import streamlit as st |
| from huggingface_hub import Repository |
|
|
| repo = Repository( |
| local_dir="scripts", |
| repo_type="model", |
| clone_from="stistko/CzechPunctuationKapitalizationBART", |
| token=True |
| ) |
| repo.git_pull() |
|
|
| from scripts.model import Model |
|
|
| @st.cache_resource |
| def get_model(): |
| return Model() |
|
|
| model = get_model() |
|
|
| st.write(""" |
| # Czech Punctuation and Capitalization Model (CPCM) |
| This application uses a transformer model 'BART-small' with subsequent fine-tuning and a contextual window of 300 tokens. |
| """) |
|
|
| |
| input_text = st.text_input("Enter text here:") |
|
|
| |
| submit_button = st.button("Submit") |
|
|
| |
| if submit_button: |
| st.write(f"Output: {model.run(input_text)}") |