defaults update
Browse files
app.py
CHANGED
@@ -423,10 +423,10 @@ def blank(tok):
|
|
423 |
test = """In contrast to necrosis, which is a form of traumatic cell death that results from acute cellular injury, apoptosis is a highly regulated and controlled process that confers advantages during an organism's life cycle. For example, the separation of fingers and toes in a developing human embryo occurs because cells between the digits undergo apoptosis. Unlike necrosis, apoptosis produces cell fragments called apoptotic bodies that phagocytes are able to engulf and remove before the contents of the cell can spill out onto surrounding cells and cause damage to them."""
|
424 |
st.header("Basic options")
|
425 |
SPACING = int(st.text_input('Blank spacing', value="7"))
|
426 |
-
OFFSET = int(st.text_input('First word to blank (0 to use spacing)', value="
|
427 |
st.header("Advanced options")
|
428 |
ALPHA = float(st.text_input('Incorrectness weight', value="0.75"))
|
429 |
-
BETA = float(st.text_input('Distinctness weight', value="0.
|
430 |
MODEL_TYPE = st.text_input('Masked Language Model (from HuggingFace)', value="roberta-large")
|
431 |
K = 16
|
432 |
|
@@ -457,7 +457,7 @@ def generate():
|
|
457 |
wb = st.session_state.text.split()
|
458 |
|
459 |
qs = []
|
460 |
-
i = OFFSET - 1 if OFFSET > 0 else SPACING
|
461 |
j = 0
|
462 |
while i < len(ws):
|
463 |
a, b = blank(ws[i])
|
|
|
423 |
test = """In contrast to necrosis, which is a form of traumatic cell death that results from acute cellular injury, apoptosis is a highly regulated and controlled process that confers advantages during an organism's life cycle. For example, the separation of fingers and toes in a developing human embryo occurs because cells between the digits undergo apoptosis. Unlike necrosis, apoptosis produces cell fragments called apoptotic bodies that phagocytes are able to engulf and remove before the contents of the cell can spill out onto surrounding cells and cause damage to them."""
|
424 |
st.header("Basic options")
|
425 |
SPACING = int(st.text_input('Blank spacing', value="7"))
|
426 |
+
OFFSET = int(st.text_input('First word to blank (0 to use spacing)', value="4"))
|
427 |
st.header("Advanced options")
|
428 |
ALPHA = float(st.text_input('Incorrectness weight', value="0.75"))
|
429 |
+
BETA = float(st.text_input('Distinctness weight', value="0.25"))
|
430 |
MODEL_TYPE = st.text_input('Masked Language Model (from HuggingFace)', value="roberta-large")
|
431 |
K = 16
|
432 |
|
|
|
457 |
wb = st.session_state.text.split()
|
458 |
|
459 |
qs = []
|
460 |
+
i = OFFSET - 1 if OFFSET > 0 else SPACING - 1
|
461 |
j = 0
|
462 |
while i < len(ws):
|
463 |
a, b = blank(ws[i])
|