Spaces:
Sleeping
Sleeping
Commit
·
fd56584
1
Parent(s):
0008647
add st.empty
Browse files
app.py
CHANGED
@@ -117,15 +117,27 @@ with st.sidebar:
|
|
117 |
tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
|
118 |
|
119 |
with tab1:
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
with tab2:
|
125 |
|
126 |
prompt = st.text_area("Prompt: ", placeholder="Enter your prompt.", on_change=None, height=200)
|
127 |
|
128 |
-
# TODO: Check if this is needed!
|
129 |
clicked = st.button("Submit")
|
130 |
|
131 |
with st.spinner("Please Wait..."):
|
|
|
117 |
tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
|
118 |
|
119 |
with tab1:
|
120 |
+
|
121 |
+
a = st.empty()
|
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 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 |
+
|
136 |
|
137 |
with tab2:
|
138 |
|
139 |
prompt = st.text_area("Prompt: ", placeholder="Enter your prompt.", on_change=None, height=200)
|
140 |
|
|
|
141 |
clicked = st.button("Submit")
|
142 |
|
143 |
with st.spinner("Please Wait..."):
|