Spaces:
Running
Running
Robustness and docs
Browse files- pages/2_Highlights.py +8 -5
pages/2_Highlights.py
CHANGED
@@ -8,10 +8,13 @@ model_options = [
|
|
8 |
'google/gemma-1.1-7b-it'
|
9 |
]
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
-
if model_name == 'other':
|
14 |
-
|
|
|
|
|
15 |
|
16 |
@st.cache_resource
|
17 |
def get_tokenizer(model_name):
|
@@ -27,8 +30,8 @@ def get_model(model_name):
|
|
27 |
return model
|
28 |
|
29 |
prompt = st.text_area("Prompt", "Rewrite this document to be more clear and concise.")
|
30 |
-
doc = st.text_area("Document", "
|
31 |
-
updated_doc = st.text_area("Updated Doc",
|
32 |
|
33 |
|
34 |
def get_spans_local(prompt, doc, updated_doc):
|
|
|
8 |
'google/gemma-1.1-7b-it'
|
9 |
]
|
10 |
|
11 |
+
if False:
|
12 |
+
model_name = st.selectbox("Select a model", model_options + ['other'])
|
13 |
|
14 |
+
if model_name == 'other':
|
15 |
+
model_name = st.text_input("Enter model name", model_options[0])
|
16 |
+
else:
|
17 |
+
model_name = model_options[0]
|
18 |
|
19 |
@st.cache_resource
|
20 |
def get_tokenizer(model_name):
|
|
|
30 |
return model
|
31 |
|
32 |
prompt = st.text_area("Prompt", "Rewrite this document to be more clear and concise.")
|
33 |
+
doc = st.text_area("Document", placeholder="Paste your document here.")
|
34 |
+
updated_doc = st.text_area("Updated Doc", placeholder="Your edited document. Leave this blank to use your original document.")
|
35 |
|
36 |
|
37 |
def get_spans_local(prompt, doc, updated_doc):
|