Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -328,8 +328,8 @@ async def generate_report(sf, output_file, contract_doc_id):
|
|
| 328 |
('End Date', r.get('End_Date__c', 'Not extracted')),
|
| 329 |
]
|
| 330 |
rows.extend(fields)
|
| 331 |
-
#
|
| 332 |
-
df = pd.DataFrame(
|
| 333 |
df.to_csv(output_file, index=False, encoding='utf-8')
|
| 334 |
return df, output_file
|
| 335 |
except Exception as e:
|
|
|
|
| 328 |
('End Date', r.get('End_Date__c', 'Not extracted')),
|
| 329 |
]
|
| 330 |
rows.extend(fields)
|
| 331 |
+
# Create DataFrame without the "Summary Report" header row
|
| 332 |
+
df = pd.DataFrame(rows, columns=['Field', 'Value']) if rows else pd.DataFrame(columns=['Field', 'Value'])
|
| 333 |
df.to_csv(output_file, index=False, encoding='utf-8')
|
| 334 |
return df, output_file
|
| 335 |
except Exception as e:
|