Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,8 +158,8 @@ if uploaded_files:
|
|
| 158 |
chunkdf = []
|
| 159 |
for i, chunk in enumerate(text_chunk):
|
| 160 |
inp = chunk
|
| 161 |
-
|
| 162 |
-
df = pd.DataFrame(repair_json(tablex_chain.run(inp)[0]))
|
| 163 |
chunkdf.append(df)
|
| 164 |
|
| 165 |
concat = pd.concat(chunkdf, axis=0).reset_index().drop('index', axis=1).fillna('')
|
|
|
|
| 158 |
chunkdf = []
|
| 159 |
for i, chunk in enumerate(text_chunk):
|
| 160 |
inp = chunk
|
| 161 |
+
df = pd.DataFrame(literal_eval(repair_json(str(json.dumps(tablex_chain.run(inp)[0]))).replace("\'", "\"")), index=[0]).fillna('')
|
| 162 |
+
# df = pd.DataFrame(repair_json(tablex_chain.run(inp)[0]))
|
| 163 |
chunkdf.append(df)
|
| 164 |
|
| 165 |
concat = pd.concat(chunkdf, axis=0).reset_index().drop('index', axis=1).fillna('')
|