Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,8 +15,8 @@ def generate_explanation(engineering_term: str) -> str:
|
|
| 15 |
"Your response should be structured into four sections:\n\n"
|
| 16 |
"1. **Definition:** Provide a concise definition.\n"
|
| 17 |
"2. **Background/Context:** Explain the history or context behind the term.\n"
|
| 18 |
-
"3. **Application/Significance:** Describe
|
| 19 |
-
"4. **Example:** Give a
|
| 20 |
f"Term: {engineering_term}"
|
| 21 |
)
|
| 22 |
|
|
@@ -26,7 +26,7 @@ def generate_explanation(engineering_term: str) -> str:
|
|
| 26 |
}
|
| 27 |
|
| 28 |
payload = {
|
| 29 |
-
"model": "llama3-8b-8192", # Replace with
|
| 30 |
"messages": [
|
| 31 |
{"role": "system", "content": "You are a helpful and friendly engineering professor."},
|
| 32 |
{"role": "user", "content": prompt}
|
|
|
|
| 15 |
"Your response should be structured into four sections:\n\n"
|
| 16 |
"1. **Definition:** Provide a concise definition.\n"
|
| 17 |
"2. **Background/Context:** Explain the history or context behind the term.\n"
|
| 18 |
+
"3. **Application/Significance:** Describe how this concept is used in **a real-world engineering task or product** (e.g., a machine, device, or construction process).\n"
|
| 19 |
+
"4. **Example:** Give a clear, everyday analogy or practical situation a user can relate to (e.g., how it works in a car, smartphone, or bridge).\n\n"
|
| 20 |
f"Term: {engineering_term}"
|
| 21 |
)
|
| 22 |
|
|
|
|
| 26 |
}
|
| 27 |
|
| 28 |
payload = {
|
| 29 |
+
"model": "llama3-8b-8192", # Replace with your actual Groq-supported model
|
| 30 |
"messages": [
|
| 31 |
{"role": "system", "content": "You are a helpful and friendly engineering professor."},
|
| 32 |
{"role": "user", "content": prompt}
|