Spaces:
Sleeping
Sleeping
| title: LLM Explanation | |
| emoji: 馃摎 | |
| colorFrom: purple | |
| colorTo: gray | |
| sdk: gradio | |
| sdk_version: 5.47.2 | |
| app_file: app.py | |
| pinned: false | |
| # Simply Supported Beam Calculator (with Natural Language Explanation) | |
| This Gradio app demonstrates a **deterministic first-principles calculator** for a simply supported beam with a **centered point load**. | |
| ## Features | |
| - Deterministic backend formulas: | |
| - Maximum bending moment: M = P路L / 4 | |
| - Maximum stress: 蟽 = M路c / I | |
| - Midspan deflection: 未 = P路L鲁 / (48路E路I) | |
| - **Input validation** with clear ranges and units. | |
| - **Structured JSON record** showing all assumptions, inputs, formulas, and results. | |
| - **Natural language explanation**: results are contextualized by an LLM pipeline (Flan-T5) or fallback template. | |
| - User-facing Gradio interface with: | |
| - Numerical results table | |
| - Explanation panel | |
| - JSON record panel | |
| ## Inputs | |
| - L (m): span length | |
| - P (kN): center point load | |
| - E (GPa): elastic modulus | |
| - I (cm^4): second moment of area | |
| - c (cm): extreme fiber distance | |
| - Optional: allowable stress (蟽_allow), yield strength (fy), safety factor (n) | |
| ## Outputs | |
| - Numerical results: bending moment, stress, deflection, utilization, pass/fail | |
| - Explanation text | |
| - Structured JSON (for reproducibility and transparency) | |
| ## Limitations | |
| - Only valid for simply supported beams with a single center load. | |
| - Small deflection theory, linear elastic, prismatic section. | |
| - Users must provide correct I and c (from section properties). | |
| --- | |
| ### How to run locally | |
| ```bash | |
| pip install -r requirements.txt | |
| python app.py | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |