Spaces:
Sleeping
Sleeping
Commit
·
a15f9dd
1
Parent(s):
fd56584
up.
Browse files
app.py
CHANGED
@@ -94,11 +94,15 @@ with st.sidebar:
|
|
94 |
in_assignees = st.text_input("Assignees Metadata: ", placeholder="e.g., USER_1, USER_2", on_change=None)
|
95 |
|
96 |
# if no headlines is selected, force the headlines to be empty as well.
|
97 |
-
|
98 |
-
'How would you like to be
|
99 |
('**Emphasis**', '# Header', 'No headlines'))
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
102 |
|
103 |
# df = pd.DataFrame(
|
104 |
# [{"headline": "Welcome"},{"headline": "Concise Description"}, {"headline": "Additional Info"}])
|
@@ -118,18 +122,14 @@ tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
|
|
118 |
|
119 |
with tab1:
|
120 |
|
121 |
-
|
|
|
122 |
|
123 |
-
# empty
|
124 |
-
res = ""
|
125 |
-
a.code(res, language='python')
|
126 |
-
|
127 |
-
prompt = "name:, etc"
|
128 |
clicked = st.button("Submit")
|
129 |
|
130 |
with st.spinner("Please Wait..."):
|
131 |
|
132 |
-
if
|
133 |
res = compute(prompt, top_p=0.92, top_k=0, do_sample=True, max_length=300, min_length=0)
|
134 |
st.code(res, language="python")
|
135 |
|
|
|
94 |
in_assignees = st.text_input("Assignees Metadata: ", placeholder="e.g., USER_1, USER_2", on_change=None)
|
95 |
|
96 |
# if no headlines is selected, force the headlines to be empty as well.
|
97 |
+
in_headline_type = st.selectbox(
|
98 |
+
'How would you like to be your Headlines?',
|
99 |
('**Emphasis**', '# Header', 'No headlines'))
|
100 |
|
101 |
+
if in_headline_type =! 'No headlines'
|
102 |
+
in_headlines = st.text_area("Headlines: ", placeholder="Enter each headline in one line. e.g.,\nWelcome\nConcise Description\nAdditional Info", on_change=None, height=200)
|
103 |
+
else:
|
104 |
+
in_headline_type = '<|EMPTY|>'
|
105 |
+
in_headlines = '<|EMPTY|>'
|
106 |
|
107 |
# df = pd.DataFrame(
|
108 |
# [{"headline": "Welcome"},{"headline": "Concise Description"}, {"headline": "Additional Info"}])
|
|
|
122 |
|
123 |
with tab1:
|
124 |
|
125 |
+
template_prompt = "name:"
|
126 |
+
filled_prompt = "name:"
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
clicked = st.button("Submit")
|
129 |
|
130 |
with st.spinner("Please Wait..."):
|
131 |
|
132 |
+
if filled_prompt!=template_prompt:
|
133 |
res = compute(prompt, top_p=0.92, top_k=0, do_sample=True, max_length=300, min_length=0)
|
134 |
st.code(res, language="python")
|
135 |
|