loubnabnl HF staff commited on
Commit
23e778d
·
1 Parent(s): f5abd01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -199,7 +199,9 @@ if st.button("Generate code!", key=4):
199
  )
200
  for i in range(len(generations)):
201
  st.markdown(f"**{selected_models[i]}**")
202
- st.code(generations[selected_models[i]])
 
 
203
  if len(generations) < len(selected_models):
204
  st.markdown("<span style='color:red'>Warning: Some models run into timeout, you can try generating code using the original subspaces: [InCoder](https://huggingface.co/spaces/loubnabnl/incoder-subspace), [CodeGen](https://huggingface.co/spaces/loubnabnl/codegen-subspace), [CodeParrot](https://huggingface.co/spaces/loubnabnl/codeparrot-subspace)</span>", unsafe_allow_html=True)
205
 
 
199
  )
200
  for i in range(len(generations)):
201
  st.markdown(f"**{selected_models[i]}**")
202
+ for i in range(len(generations)):
203
+ if selected_models in generations[i].keys():
204
+ st.code(generations[i][selected_models])
205
  if len(generations) < len(selected_models):
206
  st.markdown("<span style='color:red'>Warning: Some models run into timeout, you can try generating code using the original subspaces: [InCoder](https://huggingface.co/spaces/loubnabnl/incoder-subspace), [CodeGen](https://huggingface.co/spaces/loubnabnl/codegen-subspace), [CodeParrot](https://huggingface.co/spaces/loubnabnl/codeparrot-subspace)</span>", unsafe_allow_html=True)
207