Spaces:
Runtime error
Runtime error
make blog
Browse files
app.py
CHANGED
@@ -46,10 +46,10 @@ st.markdown(
|
|
46 |
df = pd.read_csv("utils/data_preview.csv")
|
47 |
st.dataframe(df)
|
48 |
st.header("Model")
|
49 |
-
|
50 |
"Select a code generation model", MODELS
|
51 |
)
|
52 |
-
with open(f"datasets/{
|
53 |
text = f.read()
|
54 |
st.markdown(text)
|
55 |
|
@@ -57,10 +57,10 @@ st.markdown(text)
|
|
57 |
st.title("2 - Model architecture")
|
58 |
st.markdown("Most code generation models use GPT style architectures trained on code. Some use encoder-decoder architectures such as AlphaCode.")
|
59 |
st.header("Model")
|
60 |
-
|
61 |
"Select a code generation model", MODELS
|
62 |
)
|
63 |
-
with open(f"architectures/{
|
64 |
text = f.read()
|
65 |
st.markdown(text)
|
66 |
if model == "InCoder":
|
@@ -75,7 +75,7 @@ st.markdown(intro)
|
|
75 |
# Code generation
|
76 |
st.title("4 - Code generation 💻")
|
77 |
st.header("Models")
|
78 |
-
|
79 |
"Select code generation models to compare", MODELS, default=["CodeParrot"]
|
80 |
)
|
81 |
st.header("Examples")
|
@@ -117,7 +117,7 @@ if st.button("Generate code!"):
|
|
117 |
temperature=temperature,
|
118 |
seed=seed,
|
119 |
)
|
120 |
-
output = pool.map(generate_parallel,
|
121 |
for i in range(len(output)):
|
122 |
-
st.markdown(f"**{
|
123 |
st.code(output[i])
|
|
|
46 |
df = pd.read_csv("utils/data_preview.csv")
|
47 |
st.dataframe(df)
|
48 |
st.header("Model")
|
49 |
+
selected_model1 = st.selectbox(
|
50 |
"Select a code generation model", MODELS
|
51 |
)
|
52 |
+
with open(f"datasets/{selected_model1.lower()}.txt", "r") as f:
|
53 |
text = f.read()
|
54 |
st.markdown(text)
|
55 |
|
|
|
57 |
st.title("2 - Model architecture")
|
58 |
st.markdown("Most code generation models use GPT style architectures trained on code. Some use encoder-decoder architectures such as AlphaCode.")
|
59 |
st.header("Model")
|
60 |
+
selected_model2 = st.selectbox(
|
61 |
"Select a code generation model", MODELS
|
62 |
)
|
63 |
+
with open(f"architectures/{selected_model2.lower()}.txt", "r") as f:
|
64 |
text = f.read()
|
65 |
st.markdown(text)
|
66 |
if model == "InCoder":
|
|
|
75 |
# Code generation
|
76 |
st.title("4 - Code generation 💻")
|
77 |
st.header("Models")
|
78 |
+
selected_models3 = st.sidebar.multiselect(
|
79 |
"Select code generation models to compare", MODELS, default=["CodeParrot"]
|
80 |
)
|
81 |
st.header("Examples")
|
|
|
117 |
temperature=temperature,
|
118 |
seed=seed,
|
119 |
)
|
120 |
+
output = pool.map(generate_parallel, selected_models3)
|
121 |
for i in range(len(output)):
|
122 |
+
st.markdown(f"**{selected_models3[i]}**")
|
123 |
st.code(output[i])
|