Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,8 @@ import gradio as gr
|
|
| 2 |
import tempfile
|
| 3 |
import shutil
|
| 4 |
from pathlib import Path
|
|
|
|
|
|
|
| 5 |
|
| 6 |
"""
|
| 7 |
Real Estate Financial Model Pipeline
|
|
@@ -44,23 +46,66 @@ class RealEstateModelPipeline:
|
|
| 44 |
except Exception as e:
|
| 45 |
print(f"Error extracting {pdf_path}: {e}")
|
| 46 |
return ""
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
def extract_all_pdfs(self, pdf_directory: str) -> Dict[str, str]:
|
| 49 |
-
"""Extract text from all PDFs in directory"""
|
| 50 |
pdf_dir = Path(pdf_directory)
|
| 51 |
extracted_texts = {}
|
| 52 |
|
| 53 |
with open('output_file_3.txt', "w", encoding="utf-8") as f:
|
|
|
|
| 54 |
for pdf_file in pdf_dir.glob("*.pdf"):
|
| 55 |
-
print(f"Extracting: {pdf_file.name}")
|
| 56 |
text = self.extract_pdf_text(str(pdf_file))
|
| 57 |
extracted_texts[pdf_file.stem] = text
|
| 58 |
-
|
| 59 |
-
# Write each PDFβs name and extracted text to file
|
| 60 |
f.write(f"=== {pdf_file.name} ===\n")
|
| 61 |
f.write(text)
|
| 62 |
f.write("\n\n" + "="*80 + "\n\n")
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
self.extracted_data = extracted_texts
|
| 65 |
|
| 66 |
return extracted_texts
|
|
@@ -85,198 +130,206 @@ class RealEstateModelPipeline:
|
|
| 85 |
|
| 86 |
prompt = f"""You are a real estate financial analyst. Extract ALL numerical data from the following PDF texts and return it as a JSON object.
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
for name, text in pdf_texts.items():
|
| 100 |
prompt += f"\n{'='*60}\n=== {name} ===\n{'='*60}\n{text}\n"
|
| 101 |
|
| 102 |
prompt += """
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
|
|
|
|
|
|
| 278 |
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
return prompt
|
| 282 |
|
|
@@ -1606,9 +1659,9 @@ if __name__ == "__main__":
|
|
| 1606 |
with gr.Row():
|
| 1607 |
with gr.Column(scale=2):
|
| 1608 |
pdf_input = gr.File(
|
| 1609 |
-
label="Upload PDF Files",
|
| 1610 |
file_count="multiple",
|
| 1611 |
-
file_types=[".pdf"],
|
| 1612 |
type="filepath"
|
| 1613 |
)
|
| 1614 |
|
|
@@ -1616,13 +1669,17 @@ if __name__ == "__main__":
|
|
| 1616 |
|
| 1617 |
with gr.Column(scale=1):
|
| 1618 |
gr.Markdown("""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1619 |
### π Required Documents
|
| 1620 |
-
- Offering Memorandum
|
| 1621 |
-
- Operating Expenses Summary
|
| 1622 |
-
- Sales Comps
|
| 1623 |
-
- Rent Comps
|
| 1624 |
-
- Market Report
|
| 1625 |
-
- Demographics Overview
|
| 1626 |
|
| 1627 |
### β‘ Features
|
| 1628 |
- Automated data extraction
|
|
|
|
| 2 |
import tempfile
|
| 3 |
import shutil
|
| 4 |
from pathlib import Path
|
| 5 |
+
import pandas as pd
|
| 6 |
+
from openpyxl import load_workbook
|
| 7 |
|
| 8 |
"""
|
| 9 |
Real Estate Financial Model Pipeline
|
|
|
|
| 46 |
except Exception as e:
|
| 47 |
print(f"Error extracting {pdf_path}: {e}")
|
| 48 |
return ""
|
| 49 |
+
|
| 50 |
+
def extract_xlsx_text(self, xlsx_path: str) -> str:
|
| 51 |
+
"""Extract text from XLSX using pandas and openpyxl"""
|
| 52 |
+
try:
|
| 53 |
+
extracted_content = []
|
| 54 |
+
|
| 55 |
+
# Try pandas first for data extraction
|
| 56 |
+
try:
|
| 57 |
+
xlsx = pd.ExcelFile(xlsx_path)
|
| 58 |
+
for sheet_name in xlsx.sheet_names:
|
| 59 |
+
df = pd.read_excel(xlsx, sheet_name=sheet_name)
|
| 60 |
+
extracted_content.append(f"=== Sheet: {sheet_name} ===")
|
| 61 |
+
extracted_content.append(df.to_string(index=False))
|
| 62 |
+
extracted_content.append("\n")
|
| 63 |
+
except:
|
| 64 |
+
pass
|
| 65 |
+
|
| 66 |
+
# Also try openpyxl for cell-level data
|
| 67 |
+
try:
|
| 68 |
+
wb = load_workbook(xlsx_path, data_only=True)
|
| 69 |
+
for sheet in wb.worksheets:
|
| 70 |
+
extracted_content.append(f"\n=== Sheet: {sheet.title} (Raw) ===")
|
| 71 |
+
for row in sheet.iter_rows(values_only=True):
|
| 72 |
+
row_text = " | ".join([str(cell) if cell is not None else "" for cell in row])
|
| 73 |
+
if row_text.strip():
|
| 74 |
+
extracted_content.append(row_text)
|
| 75 |
+
except:
|
| 76 |
+
pass
|
| 77 |
+
|
| 78 |
+
return "\n".join(extracted_content)
|
| 79 |
+
except Exception as e:
|
| 80 |
+
print(f"Error extracting {xlsx_path}: {e}")
|
| 81 |
+
return ""
|
| 82 |
+
|
| 83 |
def extract_all_pdfs(self, pdf_directory: str) -> Dict[str, str]:
|
| 84 |
+
"""Extract text from all PDFs and XLSX files in directory"""
|
| 85 |
pdf_dir = Path(pdf_directory)
|
| 86 |
extracted_texts = {}
|
| 87 |
|
| 88 |
with open('output_file_3.txt', "w", encoding="utf-8") as f:
|
| 89 |
+
# Process PDFs
|
| 90 |
for pdf_file in pdf_dir.glob("*.pdf"):
|
| 91 |
+
print(f"Extracting PDF: {pdf_file.name}")
|
| 92 |
text = self.extract_pdf_text(str(pdf_file))
|
| 93 |
extracted_texts[pdf_file.stem] = text
|
| 94 |
+
|
|
|
|
| 95 |
f.write(f"=== {pdf_file.name} ===\n")
|
| 96 |
f.write(text)
|
| 97 |
f.write("\n\n" + "="*80 + "\n\n")
|
| 98 |
+
|
| 99 |
+
# Process XLSX files
|
| 100 |
+
for xlsx_file in pdf_dir.glob("*.xlsx"):
|
| 101 |
+
print(f"Extracting XLSX: {xlsx_file.name}")
|
| 102 |
+
text = self.extract_xlsx_text(str(xlsx_file))
|
| 103 |
+
extracted_texts[xlsx_file.stem] = text
|
| 104 |
+
|
| 105 |
+
f.write(f"=== {xlsx_file.name} ===\n")
|
| 106 |
+
f.write(text)
|
| 107 |
+
f.write("\n\n" + "="*80 + "\n\n")
|
| 108 |
+
|
| 109 |
self.extracted_data = extracted_texts
|
| 110 |
|
| 111 |
return extracted_texts
|
|
|
|
| 130 |
|
| 131 |
prompt = f"""You are a real estate financial analyst. Extract ALL numerical data from the following PDF texts and return it as a JSON object.
|
| 132 |
|
| 133 |
+
CRITICAL INSTRUCTIONS:
|
| 134 |
+
1. ONLY extract data that is EXPLICITLY stated in the PDFs - DO NOT estimate or make up values
|
| 135 |
+
2. For missing values, use null (not 0)
|
| 136 |
+
3. Pay close attention to the specific document names - each contains different information
|
| 137 |
+
4. Extract exact numbers as they appear in the documents
|
| 138 |
+
|
| 139 |
+
AVAILABLE DOCUMENTS:
|
| 140 |
+
{pdf_summary}
|
| 141 |
+
|
| 142 |
+
PDF CONTENTS:
|
| 143 |
+
"""
|
| 144 |
for name, text in pdf_texts.items():
|
| 145 |
prompt += f"\n{'='*60}\n=== {name} ===\n{'='*60}\n{text}\n"
|
| 146 |
|
| 147 |
prompt += """
|
| 148 |
|
| 149 |
+
EXTRACTION INSTRUCTIONS BY DOCUMENT:
|
| 150 |
+
|
| 151 |
+
FROM "Offering_Memorandum.pdf":
|
| 152 |
+
- Extract: Address (full address after "Address:")
|
| 153 |
+
- Extract: Property Type (after "Property Type:")
|
| 154 |
+
- Extract: Units (number after "Units:")
|
| 155 |
+
|
| 156 |
+
FROM "Operating_Expenses_Summary.pdf" (if present):
|
| 157 |
+
- Extract EXACT annual amounts for:
|
| 158 |
+
* Real Estate Taxes
|
| 159 |
+
* Insurance
|
| 160 |
+
* Utilities
|
| 161 |
+
* Repairs & Maint. (or Repairs & Maintenance)
|
| 162 |
+
* Management Fee
|
| 163 |
+
* Payroll
|
| 164 |
+
* Administrative (if listed)
|
| 165 |
+
* Professional Fees (if listed)
|
| 166 |
+
|
| 167 |
+
FROM "Sales_Comps.pdf":
|
| 168 |
+
- Extract all Price/SF values
|
| 169 |
+
- Calculate average_price_per_sf = average of all Price/SF values
|
| 170 |
+
- Count total number of comps
|
| 171 |
+
|
| 172 |
+
FROM "Rent_Comps.pdf" (if present):
|
| 173 |
+
- Extract all rent values (numbers before @ symbol)
|
| 174 |
+
- Calculate average_rent = average of all rent values
|
| 175 |
+
- Count total number of rent comps
|
| 176 |
+
|
| 177 |
+
FROM "Market_Report.pdf":
|
| 178 |
+
- Extract: Vacancy Rate (percentage)
|
| 179 |
+
- Extract: Rent Growth (YoY) (percentage)
|
| 180 |
+
|
| 181 |
+
FROM "Demographics_Overview.pdf":
|
| 182 |
+
- Extract: Population (3-mi) - the number
|
| 183 |
+
- Extract: Median HH Income - the dollar amount
|
| 184 |
+
- Extract: Transit Score - the number
|
| 185 |
+
|
| 186 |
+
REQUIRED JSON OUTPUT STRUCTURE:
|
| 187 |
+
{
|
| 188 |
+
"property_info": {
|
| 189 |
+
"address": "EXTRACT FROM Offering_Memorandum.pdf",
|
| 190 |
+
"property_type": "EXTRACT FROM Offering_Memorandum.pdf",
|
| 191 |
+
"units": EXTRACT_NUMBER_FROM_Offering_Memorandum.pdf,
|
| 192 |
+
"gross_sf": null,
|
| 193 |
+
"rentable_sf": null,
|
| 194 |
+
"retail_sf": null
|
| 195 |
+
},
|
| 196 |
+
"acquisition": {
|
| 197 |
+
"land_value": null,
|
| 198 |
+
"price": null,
|
| 199 |
+
"closing_costs": null
|
| 200 |
+
},
|
| 201 |
+
"construction": {
|
| 202 |
+
"construction_cost_per_gsf": null,
|
| 203 |
+
"construction_months": null
|
| 204 |
+
},
|
| 205 |
+
"soft_costs": {
|
| 206 |
+
"architecture_and_interior_cost": null,
|
| 207 |
+
"structural_engineering_cost": null,
|
| 208 |
+
"mep_engineering_cost": null,
|
| 209 |
+
"civil_engineering_cost": null,
|
| 210 |
+
"controlled_inspections_cost": null,
|
| 211 |
+
"surveying_cost": null,
|
| 212 |
+
"utilities_connection_cost": null,
|
| 213 |
+
"advertising_and_marketing_cost": null,
|
| 214 |
+
"accounting_cost": null,
|
| 215 |
+
"monitoring_cost": null,
|
| 216 |
+
"ff_and_e_cost": null,
|
| 217 |
+
"environmental_consultant_fee": null,
|
| 218 |
+
"miscellaneous_consultants_fee": null,
|
| 219 |
+
"general_legal_cost": null,
|
| 220 |
+
"real_estate_taxes_during_construction": null,
|
| 221 |
+
"miscellaneous_admin_cost": null,
|
| 222 |
+
"ibr_cost": null,
|
| 223 |
+
"project_team_cost": null,
|
| 224 |
+
"pem_fees": null,
|
| 225 |
+
"bank_fees": null
|
| 226 |
+
},
|
| 227 |
+
"financing": {
|
| 228 |
+
"ltc_ratio": null,
|
| 229 |
+
"financing_percentage": null,
|
| 230 |
+
"interest_rate_basis_points": null,
|
| 231 |
+
"financing_cost": null,
|
| 232 |
+
"interest_reserve": null
|
| 233 |
+
},
|
| 234 |
+
"operating_expenses": {
|
| 235 |
+
"payroll": EXTRACT_FROM_Operating_Expenses_Summary.pdf,
|
| 236 |
+
"repairs_and_maintenance": EXTRACT_FROM_Operating_Expenses_Summary.pdf,
|
| 237 |
+
"utilities": EXTRACT_FROM_Operating_Expenses_Summary.pdf,
|
| 238 |
+
"administrative": EXTRACT_FROM_Operating_Expenses_Summary.pdf_OR_null,
|
| 239 |
+
"professional_fees": EXTRACT_FROM_Operating_Expenses_Summary.pdf_OR_null,
|
| 240 |
+
"insurance": EXTRACT_FROM_Operating_Expenses_Summary.pdf,
|
| 241 |
+
"property_taxes": EXTRACT_FROM_Operating_Expenses_Summary.pdf,
|
| 242 |
+
"management_fee_percentage": null
|
| 243 |
+
},
|
| 244 |
+
"revenue": {
|
| 245 |
+
"free_market_rent_psf": null,
|
| 246 |
+
"affordable_rent_psf": null,
|
| 247 |
+
"other_income_per_unit": null,
|
| 248 |
+
"vacancy_rate": null,
|
| 249 |
+
"retail_rent_psf": null,
|
| 250 |
+
"parking_income": null
|
| 251 |
+
},
|
| 252 |
+
"sales_comps": {
|
| 253 |
+
"average_price_per_sf": CALCULATE_AVERAGE_FROM_Sales_Comps.pdf,
|
| 254 |
+
"comp_count": COUNT_FROM_Sales_Comps.pdf
|
| 255 |
+
},
|
| 256 |
+
"rent_comps": {
|
| 257 |
+
"average_rent": CALCULATE_AVERAGE_FROM_Rent_Comps.pdf_IF_EXISTS,
|
| 258 |
+
"comp_count": COUNT_FROM_Rent_Comps.pdf_IF_EXISTS
|
| 259 |
+
},
|
| 260 |
+
"market_data": {
|
| 261 |
+
"vacancy_rate": EXTRACT_FROM_Market_Report.pdf,
|
| 262 |
+
"rent_growth_yoy": EXTRACT_FROM_Market_Report.pdf,
|
| 263 |
+
"median_hh_income": EXTRACT_FROM_Demographics_Overview.pdf,
|
| 264 |
+
"population_3mi": EXTRACT_FROM_Demographics_Overview.pdf,
|
| 265 |
+
"transit_score": EXTRACT_FROM_Demographics_Overview.pdf
|
| 266 |
+
},
|
| 267 |
+
"projections": {
|
| 268 |
+
"lease_up_months": null,
|
| 269 |
+
"stabilization_months": null,
|
| 270 |
+
"revenue_inflation_rate": null,
|
| 271 |
+
"expense_inflation_rate": null,
|
| 272 |
+
"hold_period_months": null,
|
| 273 |
+
"exit_cap_rate_decimal": null,
|
| 274 |
+
"sale_cost_percentage": null
|
| 275 |
+
},
|
| 276 |
+
"equity_structure": {
|
| 277 |
+
"gp_pref_rate": null,
|
| 278 |
+
"lp_pref_rate": null,
|
| 279 |
+
"promote_percentage": null
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
EXAMPLES OF CORRECT EXTRACTION:
|
| 284 |
+
|
| 285 |
+
Example 1 - From your Offering_Memorandum.pdf:
|
| 286 |
+
"Address: 455 Atlantic Ave, Brooklyn, NY"
|
| 287 |
+
β "address": "455 Atlantic Ave, Brooklyn, NY"
|
| 288 |
+
|
| 289 |
+
"Property Type: Retail"
|
| 290 |
+
β "property_type": "Retail"
|
| 291 |
+
|
| 292 |
+
"Units: 7"
|
| 293 |
+
β "units": 7
|
| 294 |
+
|
| 295 |
+
Example 2 - From your Operating_Expenses_Summary.pdf:
|
| 296 |
+
"Real Estate Taxes $91940.2"
|
| 297 |
+
β "property_taxes": 91940.2
|
| 298 |
+
|
| 299 |
+
"Insurance $16778.94"
|
| 300 |
+
β "insurance": 16778.94
|
| 301 |
+
|
| 302 |
+
"Payroll $44948.21"
|
| 303 |
+
β "payroll": 44948.21
|
| 304 |
+
|
| 305 |
+
Example 3 - From your Sales_Comps.pdf:
|
| 306 |
+
"Price/SF" column shows: $880, $919, $673, $894
|
| 307 |
+
β "average_price_per_sf": 841.5 (average of these 4 values)
|
| 308 |
+
β "comp_count": 4
|
| 309 |
+
|
| 310 |
+
Example 4 - From your Market_Report.pdf:
|
| 311 |
+
"Vacancy Rate: 5.71%"
|
| 312 |
+
β "vacancy_rate": 0.0571
|
| 313 |
+
|
| 314 |
+
"Rent Growth (YoY): 4.18%"
|
| 315 |
+
β "rent_growth_yoy": 0.0418
|
| 316 |
+
|
| 317 |
+
CRITICAL RULES:
|
| 318 |
+
1. Use EXACT numbers from the PDFs - don't round or modify
|
| 319 |
+
2. Convert percentages to decimals (5.71% β 0.0571)
|
| 320 |
+
3. Remove dollar signs and commas from numbers ($91,940.2 β 91940.2)
|
| 321 |
+
4. If a field is not in ANY PDF, use null
|
| 322 |
+
5. Double-check the document name before extracting - make sure you're looking at the right PDF
|
| 323 |
+
|
| 324 |
+
Return ONLY valid JSON with no explanations, comments, or markdown formatting."""
|
| 325 |
|
| 326 |
+
prompt += """
|
| 327 |
+
|
| 328 |
+
NOTE: Documents may be in PDF or XLSX format. For XLSX files, data is extracted sheet-by-sheet.
|
| 329 |
+
Look for numerical data in tables, columns, and labeled cells.
|
| 330 |
+
|
| 331 |
+
PDF AND XLSX CONTENTS:
|
| 332 |
+
"""
|
| 333 |
|
| 334 |
return prompt
|
| 335 |
|
|
|
|
| 1659 |
with gr.Row():
|
| 1660 |
with gr.Column(scale=2):
|
| 1661 |
pdf_input = gr.File(
|
| 1662 |
+
label="Upload PDF/XLSX Files",
|
| 1663 |
file_count="multiple",
|
| 1664 |
+
file_types=[".pdf", ".xlsx", ".xls"], # Added .xlsx and .xls
|
| 1665 |
type="filepath"
|
| 1666 |
)
|
| 1667 |
|
|
|
|
| 1669 |
|
| 1670 |
with gr.Column(scale=1):
|
| 1671 |
gr.Markdown("""
|
| 1672 |
+
### π Supported Formats
|
| 1673 |
+
- **PDF**: Offering Memorandum, Reports
|
| 1674 |
+
- **XLSX/XLS**: Financial statements, data tables
|
| 1675 |
+
|
| 1676 |
### π Required Documents
|
| 1677 |
+
- Offering Memorandum (PDF/XLSX)
|
| 1678 |
+
- Operating Expenses Summary (PDF/XLSX)
|
| 1679 |
+
- Sales Comps (PDF/XLSX)
|
| 1680 |
+
- Rent Comps (PDF/XLSX)
|
| 1681 |
+
- Market Report (PDF/XLSX)
|
| 1682 |
+
- Demographics Overview (PDF/XLSX)
|
| 1683 |
|
| 1684 |
### β‘ Features
|
| 1685 |
- Automated data extraction
|