albertvillanova HF staff commited on
Commit
e2e6875
1 Parent(s): 85b3821

Pass StringIO to read_html

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import json
2
 
3
  import gradio as gr
@@ -107,7 +108,7 @@ def filter_configs(df):
107
 
108
 
109
  def concat_result_1(result_1, results):
110
- results = pd.read_html(results)[0]
111
  return (
112
  pd.concat([result_1, results.iloc[:, [0, 2]].set_index("Parameters")], axis=1)
113
  .reset_index()
@@ -117,7 +118,7 @@ def concat_result_1(result_1, results):
117
 
118
 
119
  def concat_result_2(result_2, results):
120
- results = pd.read_html(results)[0]
121
  return (
122
  pd.concat([results.iloc[:, [0, 1]].set_index("Parameters"), result_2], axis=1)
123
  .reset_index()
 
1
+ import io
2
  import json
3
 
4
  import gradio as gr
 
108
 
109
 
110
  def concat_result_1(result_1, results):
111
+ results = pd.read_html(io.StringIO(results))[0]
112
  return (
113
  pd.concat([result_1, results.iloc[:, [0, 2]].set_index("Parameters")], axis=1)
114
  .reset_index()
 
118
 
119
 
120
  def concat_result_2(result_2, results):
121
+ results = pd.read_html(io.StringIO(results))[0]
122
  return (
123
  pd.concat([results.iloc[:, [0, 1]].set_index("Parameters"), result_2], axis=1)
124
  .reset_index()