Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -253,14 +253,14 @@ def main():
|
|
253 |
|
254 |
# Add the new button in the second column
|
255 |
with button_row[1]:
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
|
265 |
# Open the file in append mode
|
266 |
with open('configurations.txt', 'a') as file:
|
|
|
253 |
|
254 |
# Add the new button in the second column
|
255 |
with button_row[1]:
|
256 |
+
if st.button("Fetch Top Mergeki-Configs"):
|
257 |
+
# Export the DataFrame to CSV and save it to /tmp/models.csv
|
258 |
+
df.to_csv('/tmp/models.csv', index=False)# Add a button to export data to CSV
|
259 |
+
# Load the CSV data
|
260 |
+
df = pd.read_csv('/tmp/models.csv')
|
261 |
+
|
262 |
+
# Sort the data by the second column (assuming the column name is 'Average')
|
263 |
+
df_sorted = df.sort_values(by='Average', ascending=False)
|
264 |
|
265 |
# Open the file in append mode
|
266 |
with open('configurations.txt', 'a') as file:
|