Spaces:
Build error
Build error
Update chat.py
Browse files311 unmodified lines312313314315316317318319320315316317311 unmodified lines # Your OpenAI API key openai.api_key = os.getenv("OPENAI_API_KEY", "") # Unstructured text text = """The top 3 predicted materials in 2025 are: 1. 9762_NUT_CHNNL with a total quantity of 753 2. 8268_KIT_TOOL with a total quantity of 738 3. 5960_CABLE with a total quantity of 729""" # OpenAI prompt to structure the data prompt = f""" Extract the materials and their quantities from the following text and format them as a structured JSON:chat.py-6