Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
4 |
import seaborn as sns
|
|
|
5 |
from tqdm.auto import tqdm
|
6 |
|
7 |
# Load the CSV file into a DataFrame
|
@@ -37,7 +38,7 @@ def plot_scatter(cat, x, y, col):
|
|
37 |
pivot_df[col] = pivot_df.index.str.split("/").str[0]
|
38 |
|
39 |
# Create an interactive scatter plot
|
40 |
-
fig =
|
41 |
|
42 |
# Show the plot
|
43 |
return fig
|
|
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
4 |
import seaborn as sns
|
5 |
+
import plotly.express as px
|
6 |
from tqdm.auto import tqdm
|
7 |
|
8 |
# Load the CSV file into a DataFrame
|
|
|
38 |
pivot_df[col] = pivot_df.index.str.split("/").str[0]
|
39 |
|
40 |
# Create an interactive scatter plot
|
41 |
+
fig = px.scatter(pivot_df, x=x, y=y, hover_name=pivot_df.index, title=f'{x} vs {y}', color=col, color_continuous_scale="agsunset")
|
42 |
|
43 |
# Show the plot
|
44 |
return fig
|