Spaces:
Runtime error
Runtime error
Stefan Dumitrescu
commited on
Commit
·
806c23d
1
Parent(s):
831de4c
Update
Browse files
app.py
CHANGED
|
@@ -93,15 +93,8 @@ with col1:
|
|
| 93 |
no_repeat_ngrams = st.slider("No repeat n-grams", value=2, min_value=0, max_value=3)
|
| 94 |
|
| 95 |
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
def update_prompt():
|
| 102 |
-
st.session_state['text'] = prompt
|
| 103 |
-
|
| 104 |
-
prompt = st.selectbox("Select prompt", model_list, on_change=update_prompt)
|
| 105 |
|
| 106 |
@st.cache(allow_output_mutation=True)
|
| 107 |
def setModel(model_checkpoint):
|
|
@@ -109,11 +102,9 @@ def setModel(model_checkpoint):
|
|
| 109 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
| 110 |
return model, tokenizer
|
| 111 |
|
| 112 |
-
#####################################################
|
| 113 |
-
# show-time
|
| 114 |
|
| 115 |
if 'text' not in st.session_state:
|
| 116 |
-
st.session_state['text'] = '
|
| 117 |
|
| 118 |
details = ""
|
| 119 |
tokenized_text = None
|
|
|
|
| 93 |
no_repeat_ngrams = st.slider("No repeat n-grams", value=2, min_value=0, max_value=3)
|
| 94 |
|
| 95 |
|
| 96 |
+
#####################################################
|
| 97 |
+
# show-time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
@st.cache(allow_output_mutation=True)
|
| 100 |
def setModel(model_checkpoint):
|
|
|
|
| 102 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
| 103 |
return model, tokenizer
|
| 104 |
|
|
|
|
|
|
|
| 105 |
|
| 106 |
if 'text' not in st.session_state:
|
| 107 |
+
st.session_state['text'] = 'Scrieți aici orice text doriți și apoi apăsați unul din butoanele de mai sus. Modelul selectat va continua să scrie în continuare'
|
| 108 |
|
| 109 |
details = ""
|
| 110 |
tokenized_text = None
|