Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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" :
|
| 221 |
-
"Parsed Information": [
|
| 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
|