Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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 |
-
|
225 |
|
226 |
-
return
|
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 |
|