qq1023 commited on
Commit
16932c6
·
1 Parent(s): e65b5c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -201,9 +201,8 @@ def flag_if_shared(flag_method):
201
  return proxy
202
 
203
  def process_and_output_files(input_files):
204
- output_data = []
205
 
206
- i=0
207
  for file in input_files:
208
  # Extract and categorize text for each file
209
  text = extract_text(file)
@@ -220,10 +219,12 @@ def process_and_output_files(input_files):
220
  #"trial" : chats,
221
  chats[1]["value"][0][1] ,
222
  })
 
 
223
 
224
- i=i+1
225
 
226
- return output_data
227
 
228
 
229
 
 
201
  return proxy
202
 
203
  def process_and_output_files(input_files):
204
+ data = []
205
 
 
206
  for file in input_files:
207
  # Extract and categorize text for each file
208
  text = extract_text(file)
 
219
  #"trial" : chats,
220
  chats[1]["value"][0][1] ,
221
  })
222
+
223
+ data_dicts = [json.loads(item[0]) for item in data]
224
 
225
+ df = pd.DataFrame(data_dicts)
226
 
227
+ return df
228
 
229
 
230