mgyigit commited on
Commit
a6be00c
·
verified ·
1 Parent(s): e35c955

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -30,9 +30,8 @@ def add_new_eval(
30
  print(benchmark_type)
31
  # Save human and skempi files under ./src/data/representation_vectors using pandas
32
  if human_file is not None:
33
- output_file_path = f"./src/data/representation_vectors/{representation_name}_human.csv"
34
- with open(output_file_path, 'wb') as f:
35
- f.write(human_file)
36
 
37
  return None
38
 
@@ -93,8 +92,8 @@ with block:
93
  )
94
 
95
  with gr.Column():
96
- human_file = gr.components.File(label="Click to Upload the representation file (csv) for Human dataset", file_count="single", type='binary')
97
- skempi_file = gr.components.File(label="Click to Upload the representation file (csv) for SKEMPI dataset", file_count="single", type='binary')
98
 
99
  submit_button = gr.Button("Submit Eval")
100
  submission_result = gr.Markdown()
 
30
  print(benchmark_type)
31
  # Save human and skempi files under ./src/data/representation_vectors using pandas
32
  if human_file is not None:
33
+ human_df = pd.read_csv(human_file)
34
+ human_df.to_csv(f"./src/data/representation_vectors/{representation_name}_human.csv", index=False)
 
35
 
36
  return None
37
 
 
92
  )
93
 
94
  with gr.Column():
95
+ human_file = gr.components.File(label="Click to Upload the representation file (csv) for Human dataset", file_count="single", type='file')
96
+ skempi_file = gr.components.File(label="Click to Upload the representation file (csv) for SKEMPI dataset", file_count="single", type='file')
97
 
98
  submit_button = gr.Button("Submit Eval")
99
  submission_result = gr.Markdown()