Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -918,7 +918,7 @@ with st.sidebar:
|
|
| 918 |
# Model selection
|
| 919 |
st.session_state.model = st.selectbox(
|
| 920 |
"Select LLM Model",
|
| 921 |
-
options=["gpt-
|
| 922 |
index=0,
|
| 923 |
)
|
| 924 |
|
|
@@ -937,11 +937,11 @@ with tab1:
|
|
| 937 |
setup_option = st.radio(
|
| 938 |
"Choose how to start your project",
|
| 939 |
options=[
|
| 940 |
-
"Upload existing template",
|
| 941 |
"Create new template from documents",
|
|
|
|
| 942 |
"Create an empty template",
|
| 943 |
],
|
| 944 |
-
index=
|
| 945 |
)
|
| 946 |
|
| 947 |
if setup_option == "Upload existing template":
|
|
@@ -960,7 +960,7 @@ with tab1:
|
|
| 960 |
st.success(f"Successfully loaded template: {template_spec['name']}")
|
| 961 |
|
| 962 |
# Show template preview
|
| 963 |
-
with st.expander("Template Preview", expanded=
|
| 964 |
st.json(template_spec)
|
| 965 |
|
| 966 |
# Button to use this template
|
|
@@ -1137,7 +1137,7 @@ with tab2:
|
|
| 1137 |
"name": f"new_input_{len(st.session_state.template_spec['input']) + 1}",
|
| 1138 |
"description": "New input variable",
|
| 1139 |
"type": "string",
|
| 1140 |
-
"min":
|
| 1141 |
"max": 100,
|
| 1142 |
}
|
| 1143 |
st.session_state.template_spec["input"].append(new_var)
|
|
@@ -1209,7 +1209,7 @@ with tab2:
|
|
| 1209 |
with col_min:
|
| 1210 |
input_var["min"] = st.number_input(
|
| 1211 |
"Min selections",
|
| 1212 |
-
value=int(input_var.get("min",
|
| 1213 |
min_value=0,
|
| 1214 |
key=f"input_cat_min_{i}",
|
| 1215 |
)
|
|
@@ -1238,7 +1238,7 @@ with tab2:
|
|
| 1238 |
"name": f"new_output_{len(st.session_state.template_spec['output']) + 1}",
|
| 1239 |
"description": "New output variable",
|
| 1240 |
"type": "string",
|
| 1241 |
-
"min":
|
| 1242 |
"max": 100,
|
| 1243 |
}
|
| 1244 |
st.session_state.template_spec["output"].append(new_var)
|
|
@@ -1310,7 +1310,7 @@ with tab2:
|
|
| 1310 |
with col_min:
|
| 1311 |
output_var["min"] = st.number_input(
|
| 1312 |
"Min selections",
|
| 1313 |
-
value=int(output_var.get("min",
|
| 1314 |
min_value=0,
|
| 1315 |
key=f"output_cat_min_{i}",
|
| 1316 |
)
|
|
|
|
| 918 |
# Model selection
|
| 919 |
st.session_state.model = st.selectbox(
|
| 920 |
"Select LLM Model",
|
| 921 |
+
options=["gpt-4o-mini", "gpt-3.5-turbo", "gpt-4", "gpt-4o", "gpt-4-turbo"],
|
| 922 |
index=0,
|
| 923 |
)
|
| 924 |
|
|
|
|
| 937 |
setup_option = st.radio(
|
| 938 |
"Choose how to start your project",
|
| 939 |
options=[
|
|
|
|
| 940 |
"Create new template from documents",
|
| 941 |
+
"Upload existing template",
|
| 942 |
"Create an empty template",
|
| 943 |
],
|
| 944 |
+
index=0,
|
| 945 |
)
|
| 946 |
|
| 947 |
if setup_option == "Upload existing template":
|
|
|
|
| 960 |
st.success(f"Successfully loaded template: {template_spec['name']}")
|
| 961 |
|
| 962 |
# Show template preview
|
| 963 |
+
with st.expander("Template Preview", expanded=False):
|
| 964 |
st.json(template_spec)
|
| 965 |
|
| 966 |
# Button to use this template
|
|
|
|
| 1137 |
"name": f"new_input_{len(st.session_state.template_spec['input']) + 1}",
|
| 1138 |
"description": "New input variable",
|
| 1139 |
"type": "string",
|
| 1140 |
+
"min": 1,
|
| 1141 |
"max": 100,
|
| 1142 |
}
|
| 1143 |
st.session_state.template_spec["input"].append(new_var)
|
|
|
|
| 1209 |
with col_min:
|
| 1210 |
input_var["min"] = st.number_input(
|
| 1211 |
"Min selections",
|
| 1212 |
+
value=int(input_var.get("min", 1)),
|
| 1213 |
min_value=0,
|
| 1214 |
key=f"input_cat_min_{i}",
|
| 1215 |
)
|
|
|
|
| 1238 |
"name": f"new_output_{len(st.session_state.template_spec['output']) + 1}",
|
| 1239 |
"description": "New output variable",
|
| 1240 |
"type": "string",
|
| 1241 |
+
"min": 1,
|
| 1242 |
"max": 100,
|
| 1243 |
}
|
| 1244 |
st.session_state.template_spec["output"].append(new_var)
|
|
|
|
| 1310 |
with col_min:
|
| 1311 |
output_var["min"] = st.number_input(
|
| 1312 |
"Min selections",
|
| 1313 |
+
value=int(output_var.get("min", 1)),
|
| 1314 |
min_value=0,
|
| 1315 |
key=f"output_cat_min_{i}",
|
| 1316 |
)
|