Spaces:
Running
Running
Update app.py
Browse files3 unmodified lines4567891011121314153 unmodified lines# Configuration#LANGFLOW_API_URL = os.environ.get("LANGFLOW_API_URL", "https://rossiter78-langflowpoc.hf.space/api/v1/run/d53e1b2f-3572-40c8-84ab-725106ee858f")LANGFLOW_API_URL = os.environ.get("LANGFLOW_API_URL", "https://rossiter78-cpalangflowbackend.hf.space/api/v1/run/CPAChat")#LANGFLOW_API_URL = "https://rossiter78-langflowpoc.hf.space/api/v1/run/d53e1b2f-3572-40c8-84ab-725106ee858f"LANGFLOW_API_KEY = os.environ.get("LANGFLOW_API_KEY", "") # If neededHF_API_KEY = os.environ.get("HF_API_KEY", "")def call_langflow(message, history):"""Call Langflow API and return the response3 unmodified lines4567891011121314151617181920212223242526272829303 unmodified lines# ConfigurationLANGFLOW_API_URL = os.environ.get("LANGFLOW_API_URL", "")LANGFLOW_API_KEY = os.environ.get("LANGFLOW_API_KEY", "")HF_API_KEY = os.environ.get("HF_API_KEY", "")if not LANGFLOW_API_URL:print("FATAL: LANGFLOW_API_URL secret not found or is empty.")else:print("SUCCESS: LANGFLOW_API_URL loaded securely.")if not LANGFLOW_API_KEY:print("FATAL: LANGFLOW_API_KEY secret not found or is empty.")else:print("SUCCESS: LANGFLOW_API_KEY loaded securely.")if not HF_API_KEY:print("FATAL: HF_API_KEY secret not found or is empty.")else:print("SUCCESS: HF_API_KEY loaded securely.")# Funcation definitiondef call_langflow(message, history):"""Call Langflow API and return the response
app.py+19-4