qq1023 commited on
Commit
f03586e
·
1 Parent(s): b0f3144

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -210,15 +210,15 @@ def process_and_output_files(input_files):
210
  category = categorize_text(text)
211
  chatbot_response = query(category, text) # Convert the generator to a list
212
  #parsed_info = parse(category, chatbot_response)
213
-
214
  # Append the relevant data for this file to the output_data list
215
  output_data.append({
216
  "File Name": file.name,
217
  "Extracted Text": text,
218
  "Category": category,
219
  "Chatbot Response": chatbot_response, # Access the first element as a list
220
- "trial" : list(chatbot_response),
221
- "Parsed Information": [item['value'][0][-1] for item in list(chatbot_response)] ,
222
  })
223
 
224
  i=i+1
 
210
  category = categorize_text(text)
211
  chatbot_response = query(category, text) # Convert the generator to a list
212
  #parsed_info = parse(category, chatbot_response)
213
+ chats=list(chatbot_response)
214
  # Append the relevant data for this file to the output_data list
215
  output_data.append({
216
  "File Name": file.name,
217
  "Extracted Text": text,
218
  "Category": category,
219
  "Chatbot Response": chatbot_response, # Access the first element as a list
220
+ "trial" : chats,
221
+ "Parsed Information": chats[1]["value"][0][1] ,
222
  })
223
 
224
  i=i+1