Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -428,8 +428,10 @@ def inventory_report(question):
|
|
| 428 |
if "warehouseId" in api["params"]:
|
| 429 |
api["params"]["warehouseId"] = warehouse_id
|
| 430 |
|
| 431 |
-
print("after api id")
|
|
|
|
| 432 |
data1 = make_api_request(apis[1]["url"], apis[1]["params"])
|
|
|
|
| 433 |
if (data1):
|
| 434 |
headers = ["S.No", "Warehouse Code", "Warehouse Name", "Customer Code", "Customer Name", "Item Code", "Item Name",
|
| 435 |
"Currency", "EAN", "UOM", "Quantity", "Gross Weight", "Volume", "Total Value"]
|
|
@@ -456,7 +458,7 @@ def inventory_report(question):
|
|
| 456 |
|
| 457 |
# Convert to pandas DataFrame
|
| 458 |
df = pd.DataFrame(table_data, columns=headers)
|
| 459 |
-
|
| 460 |
chart_link = chat_with_llm(df,question)
|
| 461 |
|
| 462 |
return chart_link
|
|
|
|
| 428 |
if "warehouseId" in api["params"]:
|
| 429 |
api["params"]["warehouseId"] = warehouse_id
|
| 430 |
|
| 431 |
+
print("after api id")
|
| 432 |
+
print(apis)
|
| 433 |
data1 = make_api_request(apis[1]["url"], apis[1]["params"])
|
| 434 |
+
print(data1)
|
| 435 |
if (data1):
|
| 436 |
headers = ["S.No", "Warehouse Code", "Warehouse Name", "Customer Code", "Customer Name", "Item Code", "Item Name",
|
| 437 |
"Currency", "EAN", "UOM", "Quantity", "Gross Weight", "Volume", "Total Value"]
|
|
|
|
| 458 |
|
| 459 |
# Convert to pandas DataFrame
|
| 460 |
df = pd.DataFrame(table_data, columns=headers)
|
| 461 |
+
print(df)
|
| 462 |
chart_link = chat_with_llm(df,question)
|
| 463 |
|
| 464 |
return chart_link
|