Spaces:
Build error
Build error
leandro
commited on
Commit
•
27ff797
1
Parent(s):
7e61ab1
fix model name
Browse files
app.py
CHANGED
@@ -36,5 +36,6 @@ if gen_kwargs["do_sample"]:
|
|
36 |
|
37 |
gen_prompt = st.text_area("Generate code with prompt:", value=default_code, height=220,).strip()
|
38 |
if st.button("Generate code!"):
|
39 |
-
|
|
|
40 |
st.code(generated_text)
|
|
|
36 |
|
37 |
gen_prompt = st.text_area("Generate code with prompt:", value=default_code, height=220,).strip()
|
38 |
if st.button("Generate code!"):
|
39 |
+
with st.spinner("Generating code..."):
|
40 |
+
generated_text = pipe(gen_prompt, **gen_kwargs)[0]['generated_text']
|
41 |
st.code(generated_text)
|