Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ model = st.selectbox("🧠 Choose a model to use:", [
|
|
| 20 |
|
| 21 |
# --- API Call Function ---
|
| 22 |
def get_explanation_from_groq(term, model):
|
| 23 |
-
api_key = os.getenv("GROQ_API_KEY") #
|
| 24 |
if not api_key:
|
| 25 |
return "❌ API key not found. Please set the GROQ_API_KEY environment variable."
|
| 26 |
|
|
@@ -39,7 +39,7 @@ Use this exact structure and emojis:
|
|
| 39 |
|
| 40 |
📐 Typical Formula: If there’s a well-known formula, write it out and explain what each variable means. If no standard formula exists, state: “There is no standard formula for this term.”
|
| 41 |
|
| 42 |
-
🏗️ Engineering Applications: List 2–3
|
| 43 |
"""
|
| 44 |
|
| 45 |
headers = {
|
|
|
|
| 20 |
|
| 21 |
# --- API Call Function ---
|
| 22 |
def get_explanation_from_groq(term, model):
|
| 23 |
+
api_key = os.getenv("GROQ_API_KEY") # Set this in Hugging Face or your local .env
|
| 24 |
if not api_key:
|
| 25 |
return "❌ API key not found. Please set the GROQ_API_KEY environment variable."
|
| 26 |
|
|
|
|
| 39 |
|
| 40 |
📐 Typical Formula: If there’s a well-known formula, write it out and explain what each variable means. If no standard formula exists, state: “There is no standard formula for this term.”
|
| 41 |
|
| 42 |
+
🏗️ Engineering Applications: List 2–3 specific real-world applications where this term is used in engineering practice. For example, describe actual scenarios, devices, systems, or problems that involve this concept.
|
| 43 |
"""
|
| 44 |
|
| 45 |
headers = {
|