Spaces:
Sleeping
Sleeping
| """ | |
| Configuration for the Polymer Datasheet Crawler Agent. | |
| """ | |
| import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # ββ API Keys ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| TAVILY_API_KEY = os.getenv("TAVILY_API_KEY", "") | |
| HF_TOKEN = os.getenv("HF_TOKEN", "") | |
| # ββ LLM Settings βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| HF_MODEL_ID = os.getenv("HF_MODEL_ID", "meta-llama/Llama-3.3-70B-Instruct") | |
| LLM_MAX_NEW_TOKENS = 4096 | |
| LLM_TEMPERATURE = 0.1 # Low temperature for structured extraction | |
| # ββ Tavily Search Settings βββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| TAVILY_SEARCH_DEPTH = "advanced" # "basic" or "advanced" | |
| TAVILY_MAX_RESULTS = 8 # Number of search results per query | |
| TAVILY_INCLUDE_RAW_CONTENT = True # Include full page content | |
| # ββ Database Settings ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| DB_PATH = os.getenv("DB_PATH", "polymer_datasheets.db") | |
| # ββ Trusted Sources (prioritized in search) ββββββββββββββββββββββββββββββββββ | |
| TRUSTED_DOMAINS = [ | |
| "matweb.com", | |
| "omnexus.specialchem.com", | |
| "prospector.ides.com", | |
| "campusplastics.com", | |
| "plastics.ulprospector.com", | |
| "polymerdatabase.com", | |
| "sabic.com", | |
| "basf.com", | |
| "dupont.com", | |
| "dow.com", | |
| "covestro.com", | |
| "lanxess.com", | |
| "celanese.com", | |
| "solvay.com", | |
| "arkema.com", | |
| "evonik.com", | |
| "eastman.com", | |
| "lyondellbasell.com", | |
| "totalenergies.com", | |
| "ineos.com", | |
| "mitsubishichemical.com", | |
| "toray.com", | |
| "teijin.com", | |
| ] | |
| # ββ Datasheet Property Categories ββββββββββββββββββββββββββββββββββββββββββββ | |
| # Standard properties to extract from datasheets | |
| PROPERTY_SCHEMA = { | |
| "general": [ | |
| "material_name", | |
| "trade_name", | |
| "manufacturer", | |
| "polymer_family", | |
| "grade", | |
| "description", | |
| "processing_method", | |
| "features", | |
| "applications", | |
| ], | |
| "mechanical": [ | |
| "tensile_strength_mpa", | |
| "tensile_modulus_mpa", | |
| "elongation_at_break_pct", | |
| "flexural_strength_mpa", | |
| "flexural_modulus_mpa", | |
| "impact_strength_charpy_kj_m2", | |
| "impact_strength_izod_j_m", | |
| "hardness_shore_d", | |
| "hardness_rockwell", | |
| "compressive_strength_mpa", | |
| ], | |
| "thermal": [ | |
| "melting_temperature_c", | |
| "glass_transition_temperature_c", | |
| "heat_deflection_temperature_c", | |
| "vicat_softening_temperature_c", | |
| "continuous_service_temperature_c", | |
| "thermal_conductivity_w_mk", | |
| "coefficient_of_thermal_expansion_um_mk", | |
| "flammability_rating", | |
| ], | |
| "physical": [ | |
| "density_g_cm3", | |
| "melt_flow_index_g_10min", | |
| "water_absorption_pct", | |
| "moisture_absorption_pct", | |
| "specific_gravity", | |
| "transparency", | |
| "color", | |
| ], | |
| "electrical": [ | |
| "dielectric_strength_kv_mm", | |
| "dielectric_constant", | |
| "volume_resistivity_ohm_cm", | |
| "surface_resistivity_ohm", | |
| "dissipation_factor", | |
| ], | |
| "chemical_resistance": [ | |
| "acid_resistance", | |
| "alkali_resistance", | |
| "solvent_resistance", | |
| "uv_resistance", | |
| "weatherability", | |
| ], | |
| "regulatory": [ | |
| "fda_approved", | |
| "rohs_compliant", | |
| "reach_compliant", | |
| "ul94_rating", | |
| ], | |
| } | |