Spaces:
Sleeping
Sleeping
Sw1ft0
commited on
Commit
·
13a0a1c
1
Parent(s):
2732dc8
Update get_schema_info function to read each Sheet and its columns
Browse files
app.py
CHANGED
|
@@ -13,9 +13,13 @@ df2 = pd.read_excel(os.path.join("data_source", "The Alex Ideas Report.xlsx"), s
|
|
| 13 |
|
| 14 |
# Build schema info for prompts
|
| 15 |
def get_schema_info():
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
schema_info = get_schema_info()
|
| 21 |
|
|
|
|
| 13 |
|
| 14 |
# Build schema info for prompts
|
| 15 |
def get_schema_info():
|
| 16 |
+
schema1_lines = ["Report 1 - OC Onboarding Information", "Sheet Name: [Sheet Columns]"]
|
| 17 |
+
for sheet, df in df1.items():
|
| 18 |
+
schema1_lines.append(f"{sheet}: {list(df.columns)}")
|
| 19 |
+
schema2_lines = ["Report 2 - The Alex Ideas Report", "Sheet Name: [Sheet Columns]"]
|
| 20 |
+
for sheet, df in df2.items():
|
| 21 |
+
schema2_lines.append(f"{sheet}: {list(df.columns)}")
|
| 22 |
+
return "\n".join(schema1_lines + schema2_lines)
|
| 23 |
|
| 24 |
schema_info = get_schema_info()
|
| 25 |
|