Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
def generate_procurement_data():
|
| 6 |
+
# Simulating data generation from 10 to 1150 with incremental material numbers
|
| 7 |
+
data = {
|
| 8 |
+
"Sl No": list(range(10, 1160, 10)),
|
| 9 |
+
"Material Description": [f"BPS 017507, Material Number: 22073{str(i).zfill(5)}" for i in range(65400, 65400 + 1150, 10)],
|
| 10 |
+
"Unit": ["NO"] * 115,
|
| 11 |
+
"Quantity": [20] * 115,
|
| 12 |
+
"Dely Qty": [20] * 115,
|
| 13 |
+
"Dely Date": ["04.11.2024"] * 115,
|
| 14 |
+
"Unit Rate": [205.76] * 115,
|
| 15 |
+
"Value": [4115.2] * 115
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
# Creating DataFrame
|
| 19 |
+
df = pd.DataFrame(data)
|
| 20 |
+
|
| 21 |
+
# Saving to Excel
|
| 22 |
+
output_file = "Procurement_Summary_Full_Range.xlsx"
|
| 23 |
+
df.to_excel(output_file, index=False)
|
| 24 |
+
print(f"Excel file '{output_file}' generated successfully with procurement data.")
|
| 25 |
+
return output_file
|
| 26 |
+
|
| 27 |
+
def main():
|
| 28 |
+
# Assuming an NLP model for possible text processing or future enhancement (optional)
|
| 29 |
+
# You can use a Hugging Face model pipeline, like a text summarization model, if needed for extraction.
|
| 30 |
+
print("Starting procurement data generation...")
|
| 31 |
+
output_file = generate_procurement_data()
|
| 32 |
+
print(f"Output file generated at: {output_file}")
|
| 33 |
+
|
| 34 |
+
if __name__ == "__main__":
|
| 35 |
+
main()
|