Spaces:
Sleeping
Sleeping
Simplify, removing the nuance of updated_doc
Browse files
app.py
CHANGED
|
@@ -98,22 +98,12 @@ def highlight_edits():
|
|
| 98 |
import html
|
| 99 |
prompt = get_prompt(include_generation_options=False)
|
| 100 |
st.write("Prompt:", prompt)
|
| 101 |
-
doc = st.
|
| 102 |
-
if doc:
|
| 103 |
-
st.write("Generating suggestions based on the following document:")
|
| 104 |
-
st.write(doc)
|
| 105 |
-
else:
|
| 106 |
-
st.write("Enter a document to see suggestions.")
|
| 107 |
-
updated_doc = st.text_area(
|
| 108 |
"Document",
|
| 109 |
"Deep learning neural network technology advances are pretty cool if you are careful to use it in ways that don't take stuff from people.",
|
| 110 |
-
height=
|
| 111 |
)
|
| 112 |
-
|
| 113 |
-
st.session_state['doc'] = updated_doc
|
| 114 |
-
st.button("Save document", on_click=save_document)
|
| 115 |
-
|
| 116 |
-
spans = get_highlights(prompt, doc, updated_doc)
|
| 117 |
|
| 118 |
if len(spans) < 2:
|
| 119 |
st.write("No spans found.")
|
|
|
|
| 98 |
import html
|
| 99 |
prompt = get_prompt(include_generation_options=False)
|
| 100 |
st.write("Prompt:", prompt)
|
| 101 |
+
doc = st.text_area(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
"Document",
|
| 103 |
"Deep learning neural network technology advances are pretty cool if you are careful to use it in ways that don't take stuff from people.",
|
| 104 |
+
height=150
|
| 105 |
)
|
| 106 |
+
spans = get_highlights(prompt, doc, doc)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
if len(spans) < 2:
|
| 109 |
st.write("No spans found.")
|