CultriX commited on
Commit
38e1340
·
verified ·
1 Parent(s): 982fdda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -3,12 +3,10 @@ import pandas as pd
3
  import matplotlib.pyplot as plt
4
  import seaborn as sns
5
  import plotly.graph_objs as go
6
- import plotly.offline as py
7
  from io import StringIO
8
  import base64
9
 
10
- py.init_notebook_mode(connected=True)
11
-
12
  # Read the data from the file
13
  def parse_data(file_content):
14
  lines = file_content.splitlines()
@@ -147,7 +145,7 @@ def generate_visualizations(data, averages):
147
 
148
  # Create plotly bar charts
149
  fig1 = create_bar_chart(averages, 'Average Performance')
150
- plotly_avg = fig1.to_html(full_html=False)
151
 
152
  plotly_tasks = {}
153
  # Assuming you have tasks in the dataframe and want to display it
@@ -156,7 +154,7 @@ def generate_visualizations(data, averages):
156
  task_data = data[data['Task'] == task]
157
  fig2 = create_bar_chart(task_data, 'Value')
158
  fig2.update_layout(title=f"Leaderboard for {task} Scores")
159
- plotly_tasks[task] = fig2.to_html(full_html=False)
160
 
161
  return image_avg, image_line, image_heatmap, image_boxplot, plotly_avg, plotly_tasks
162
 
 
3
  import matplotlib.pyplot as plt
4
  import seaborn as sns
5
  import plotly.graph_objs as go
6
+ import plotly.io as pio
7
  from io import StringIO
8
  import base64
9
 
 
 
10
  # Read the data from the file
11
  def parse_data(file_content):
12
  lines = file_content.splitlines()
 
145
 
146
  # Create plotly bar charts
147
  fig1 = create_bar_chart(averages, 'Average Performance')
148
+ plotly_avg = pio.to_html(fig1, full_html=False)
149
 
150
  plotly_tasks = {}
151
  # Assuming you have tasks in the dataframe and want to display it
 
154
  task_data = data[data['Task'] == task]
155
  fig2 = create_bar_chart(task_data, 'Value')
156
  fig2.update_layout(title=f"Leaderboard for {task} Scores")
157
+ plotly_tasks[task] = pio.to_html(fig2, full_html=False)
158
 
159
  return image_avg, image_line, image_heatmap, image_boxplot, plotly_avg, plotly_tasks
160