kcarnold commited on
Commit
fdf3450
1 Parent(s): 6033709

quick styling edits

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -28,7 +28,7 @@ def get_prompt(*, include_generation_options, default="Rewrite this document to
28
  "Write a concise essay according to this outline.",
29
  "Write a detailed essay according to this outline.",
30
  ]
31
- with st.popover("Prompt options"):
32
  prompt_options = [
33
  "Rewrite this document to be ...",
34
  *(generation_options if include_generation_options else []),
@@ -53,8 +53,11 @@ def get_preds_api(prompt, original_doc, rewrite_in_progress, k=5):
53
  def rewrite_with_predictions():
54
  st.title("Rewrite with Predictive Text")
55
 
56
- prompt = get_prompt(include_generation_options=True)
57
- st.write("Prompt:", prompt)
 
 
 
58
 
59
  cols = st.columns(2)
60
  with cols[0]:
@@ -93,11 +96,12 @@ def get_highlights(prompt, doc, updated_doc):
93
 
94
 
95
  def highlight_edits():
96
- st.title("Highlight locations for possible edits")
97
-
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.",
 
28
  "Write a concise essay according to this outline.",
29
  "Write a detailed essay according to this outline.",
30
  ]
31
+ with st.popover("Edit Prompt"):
32
  prompt_options = [
33
  "Rewrite this document to be ...",
34
  *(generation_options if include_generation_options else []),
 
53
  def rewrite_with_predictions():
54
  st.title("Rewrite with Predictive Text")
55
 
56
+ cols = st.columns(2)
57
+ with cols[0]:
58
+ prompt = get_prompt(include_generation_options=True)
59
+ with cols[1]:
60
+ st.write("Prompt:", prompt)
61
 
62
  cols = st.columns(2)
63
  with cols[0]:
 
96
 
97
 
98
  def highlight_edits():
 
 
99
  import html
100
+ cols = st.columns([1, 4], vertical_alignment="center")
101
+ with cols[0]:
102
+ prompt = get_prompt(include_generation_options=False)
103
+ with cols[1]:
104
+ st.write("**Prompt**:", prompt)
105
  doc = st.text_area(
106
  "Document",
107
  "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.",