Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -208,15 +208,15 @@ def process_and_output_files(input_files):
|
|
| 208 |
text = extract_text(file)
|
| 209 |
category = categorize_text(text)
|
| 210 |
chatbot_response = query(category, text) # Convert the generator to a list
|
| 211 |
-
parsed_info = parse(category, chatbot_response)
|
| 212 |
|
| 213 |
# Append the relevant data for this file to the output_data list
|
| 214 |
output_data.append({
|
| 215 |
"File Name": file.name,
|
| 216 |
"Extracted Text": text,
|
| 217 |
"Category": category,
|
| 218 |
-
|
| 219 |
-
"Parsed Information": parsed_info,
|
| 220 |
})
|
| 221 |
|
| 222 |
return output_data
|
|
|
|
| 208 |
text = extract_text(file)
|
| 209 |
category = categorize_text(text)
|
| 210 |
chatbot_response = query(category, text) # Convert the generator to a list
|
| 211 |
+
#parsed_info = parse(category, chatbot_response)
|
| 212 |
|
| 213 |
# Append the relevant data for this file to the output_data list
|
| 214 |
output_data.append({
|
| 215 |
"File Name": file.name,
|
| 216 |
"Extracted Text": text,
|
| 217 |
"Category": category,
|
| 218 |
+
"Chatbot Response": chatbot_response # Access the first element as a list
|
| 219 |
+
#"Parsed Information": parsed_info,
|
| 220 |
})
|
| 221 |
|
| 222 |
return output_data
|