Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,19 +15,19 @@ global data_component, filter_component
|
|
| 15 |
|
| 16 |
def get_baseline_df():
|
| 17 |
df = pd.read_csv(CSV_RESULT_PATH)
|
| 18 |
-
present_columns = ["
|
| 19 |
df = df[present_columns]
|
| 20 |
return df
|
| 21 |
|
| 22 |
# Function to create the plot
|
| 23 |
def create_plot(methods_selected, x_metric, y_metric):
|
| 24 |
df = pd.read_csv(CSV_RESULT_PATH)
|
| 25 |
-
filtered_df = df[df['
|
| 26 |
|
| 27 |
# Create a larger plot
|
| 28 |
plt.figure(figsize=(10, 8)) # Increase the figure size
|
| 29 |
for method in methods_selected:
|
| 30 |
-
method_data = filtered_df[filtered_df['
|
| 31 |
plt.plot(method_data[x_metric], method_data[y_metric], label=method, marker='o')
|
| 32 |
|
| 33 |
plt.xlabel(x_metric)
|
|
|
|
| 15 |
|
| 16 |
def get_baseline_df():
|
| 17 |
df = pd.read_csv(CSV_RESULT_PATH)
|
| 18 |
+
present_columns = ["method_name"] + checkbox_group.value
|
| 19 |
df = df[present_columns]
|
| 20 |
return df
|
| 21 |
|
| 22 |
# Function to create the plot
|
| 23 |
def create_plot(methods_selected, x_metric, y_metric):
|
| 24 |
df = pd.read_csv(CSV_RESULT_PATH)
|
| 25 |
+
filtered_df = df[df['method_name'].isin(methods_selected)]
|
| 26 |
|
| 27 |
# Create a larger plot
|
| 28 |
plt.figure(figsize=(10, 8)) # Increase the figure size
|
| 29 |
for method in methods_selected:
|
| 30 |
+
method_data = filtered_df[filtered_df['method_name'] == method]
|
| 31 |
plt.plot(method_data[x_metric], method_data[y_metric], label=method, marker='o')
|
| 32 |
|
| 33 |
plt.xlabel(x_metric)
|