Spaces:
Sleeping
Sleeping
Commit
·
c055836
1
Parent(s):
67ad415
ueifu
Browse files
app.py
CHANGED
|
@@ -2535,19 +2535,25 @@ def edit_parameters():
|
|
| 2535 |
for line in response_lines:
|
| 2536 |
if 'Updated supplier_name:' in line:
|
| 2537 |
new_supplier = line.split('Updated supplier_name:')[1].strip()
|
| 2538 |
-
|
|
|
|
|
|
|
| 2539 |
supplier_name = new_supplier
|
| 2540 |
print(f"✅ Updated supplier name to: {supplier_name}")
|
| 2541 |
|
| 2542 |
if 'Updated product_name:' in line:
|
| 2543 |
new_product = line.split('Updated product_name:')[1].strip()
|
| 2544 |
-
|
|
|
|
|
|
|
| 2545 |
product_name = new_product
|
| 2546 |
print(f"✅ Updated product name to: {product_name}")
|
| 2547 |
|
| 2548 |
if 'Updated doc_type:' in line:
|
| 2549 |
new_doctype = line.split('Updated doc_type:')[1].strip()
|
| 2550 |
-
|
|
|
|
|
|
|
| 2551 |
doc_type = new_doctype
|
| 2552 |
print(f"✅ Updated doc type to: {doc_type}")# Parse response
|
| 2553 |
|
|
|
|
| 2535 |
for line in response_lines:
|
| 2536 |
if 'Updated supplier_name:' in line:
|
| 2537 |
new_supplier = line.split('Updated supplier_name:')[1].strip()
|
| 2538 |
+
# Clean asterisks and extra formatting
|
| 2539 |
+
new_supplier = new_supplier.replace('**', '').replace('*', '').strip()
|
| 2540 |
+
if new_supplier and new_supplier != supplier_name and new_supplier != "Yash Gori":
|
| 2541 |
supplier_name = new_supplier
|
| 2542 |
print(f"✅ Updated supplier name to: {supplier_name}")
|
| 2543 |
|
| 2544 |
if 'Updated product_name:' in line:
|
| 2545 |
new_product = line.split('Updated product_name:')[1].strip()
|
| 2546 |
+
# Clean asterisks and extra formatting
|
| 2547 |
+
new_product = new_product.replace('**', '').replace('*', '').strip()
|
| 2548 |
+
if new_product and new_product != product_name and new_product != "Heading":
|
| 2549 |
product_name = new_product
|
| 2550 |
print(f"✅ Updated product name to: {product_name}")
|
| 2551 |
|
| 2552 |
if 'Updated doc_type:' in line:
|
| 2553 |
new_doctype = line.split('Updated doc_type:')[1].strip()
|
| 2554 |
+
# Clean asterisks and extra formatting
|
| 2555 |
+
new_doctype = new_doctype.replace('**', '').replace('*', '').strip()
|
| 2556 |
+
if new_doctype and new_doctype != doc_type and new_doctype != "Inspection Document":
|
| 2557 |
doc_type = new_doctype
|
| 2558 |
print(f"✅ Updated doc type to: {doc_type}")# Parse response
|
| 2559 |
|