Spaces:
Runtime error
Runtime error
| import pandas as pd | |
| from transformers import pipeline | |
| import os | |
| def generate_procurement_data(): | |
| # Simulating data generation from 10 to 1150 with incremental material numbers | |
| data = { | |
| "Sl No": list(range(10, 1160, 10)), | |
| "Material Description": [f"BPS 017507, Material Number: 22073{str(i).zfill(5)}" for i in range(65400, 65400 + 1150, 10)], | |
| "Unit": ["NO"] * 115, | |
| "Quantity": [20] * 115, | |
| "Dely Qty": [20] * 115, | |
| "Dely Date": ["04.11.2024"] * 115, | |
| "Unit Rate": [205.76] * 115, | |
| "Value": [4115.2] * 115 | |
| } | |
| # Creating DataFrame | |
| df = pd.DataFrame(data) | |
| # Saving to Excel | |
| output_file = "Procurement_Summary_Full_Range.xlsx" | |
| df.to_excel(output_file, index=False) | |
| print(f"Excel file '{output_file}' generated successfully with procurement data.") | |
| return output_file | |
| def main(): | |
| # Assuming an NLP model for possible text processing or future enhancement (optional) | |
| # You can use a Hugging Face model pipeline, like a text summarization model, if needed for extraction. | |
| print("Starting procurement data generation...") | |
| output_file = generate_procurement_data() | |
| print(f"Output file generated at: {output_file}") | |
| if __name__ == "__main__": | |
| main() | |