Update app102.py
Browse files
app102.py
CHANGED
@@ -1241,6 +1241,17 @@ if "task_choice" in st.session_state:
|
|
1241 |
'Use few-shot example?': 'Yes' if use_few_shot else 'No',
|
1242 |
})
|
1243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1244 |
######
|
1245 |
|
1246 |
|
@@ -1269,18 +1280,18 @@ if "task_choice" in st.session_state:
|
|
1269 |
# Convert to CSV and JSON
|
1270 |
df = pd.DataFrame(labeled_examples)
|
1271 |
|
1272 |
-
########3
|
1273 |
-
if labeled_examples:
|
1274 |
-
|
1275 |
|
1276 |
-
|
1277 |
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
###########
|
1285 |
#new 22/4/2025
|
1286 |
# CSV
|
|
|
1241 |
'Use few-shot example?': 'Yes' if use_few_shot else 'No',
|
1242 |
})
|
1243 |
|
1244 |
+
#new 24/4/2025
|
1245 |
+
# Save and provide download options
|
1246 |
+
if labeled_examples:
|
1247 |
+
# Update session state
|
1248 |
+
st.session_state.labeled_examples = labeled_examples
|
1249 |
+
|
1250 |
+
# Convert to CSV and JSON
|
1251 |
+
df = pd.DataFrame(labeled_examples)
|
1252 |
+
|
1253 |
+
####
|
1254 |
+
|
1255 |
######
|
1256 |
|
1257 |
|
|
|
1280 |
# Convert to CSV and JSON
|
1281 |
df = pd.DataFrame(labeled_examples)
|
1282 |
|
1283 |
+
# ########3
|
1284 |
+
# if labeled_examples:
|
1285 |
+
# df = pd.DataFrame(labeled_examples)
|
1286 |
|
1287 |
+
# csv = df.to_csv(index=False).encode('utf-8')
|
1288 |
|
1289 |
+
# st.download_button(
|
1290 |
+
# label="📥 Download Labeled Examples CSV",
|
1291 |
+
# data=csv,
|
1292 |
+
# file_name='labeled_examples.csv',
|
1293 |
+
# mime='text/csv'
|
1294 |
+
# )
|
1295 |
###########
|
1296 |
#new 22/4/2025
|
1297 |
# CSV
|