CognitiveScience commited on
Commit
25be80a
·
1 Parent(s): a4920f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -129,13 +129,13 @@ def load_data():
129
  return reviews, total_reviews
130
 
131
  # Creating a sample dataframe
132
- df = pd.DataFrame({
133
- "A" : [14, 4, 5, 4, 1],
134
- "B" : [5, 2, 54, 3, 2],
135
- "C" : [20, 20, 7, 3, 8],
136
- "D" : [14, 3, 6, 2, 6],
137
- "E" : [23, 45, 64, 32, 23]
138
- })
139
 
140
  # Applying style to highlight the maximum value in each row
141
 
@@ -146,8 +146,8 @@ with gr.Blocks() as demo:
146
  with gr.Row():
147
  with gr.Column():
148
  result=run_ecs("Dan")
149
-
150
- df=pd.DataFrame(result)
151
  styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
152
  #print(result)
153
  gr.Dataframe(styler)
 
129
  return reviews, total_reviews
130
 
131
  # Creating a sample dataframe
132
+ #df = pd.DataFrame({
133
+ # "A" : [14, 4, 5, 4, 1],
134
+ # "B" : [5, 2, 54, 3, 2],
135
+ # "C" : [20, 20, 7, 3, 8],
136
+ # "D" : [14, 3, 6, 2, 6],
137
+ # "E" : [23, 45, 64, 32, 23]
138
+ #})
139
 
140
  # Applying style to highlight the maximum value in each row
141
 
 
146
  with gr.Row():
147
  with gr.Column():
148
  result=run_ecs("Dan")
149
+ df = pd.DataFrame.from_dict(result, orient='records')
150
+ #df=pd.DataFrame(result)
151
  styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
152
  #print(result)
153
  gr.Dataframe(styler)