Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,12 +23,27 @@ pipe = load_engine()
|
|
| 23 |
|
| 24 |
# Strict Academic System Prompt
|
| 25 |
system_instruction = (
|
| 26 |
-
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
|
| 30 |
-
"
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
user_query = st.chat_input("Enter your problem...")
|
|
|
|
| 23 |
|
| 24 |
# Strict Academic System Prompt
|
| 25 |
system_instruction = (
|
| 26 |
+
system_instruction = (
|
| 27 |
+
"You are a Senior Mathematics Professor at a top-tier university. "
|
| 28 |
+
"Follow these strict logical rules for all solutions:\n\n"
|
| 29 |
+
|
| 30 |
+
"1. STRUCTURE: Always start with 'Definitions & Prerequisites', followed by 'Step-by-Step Proof', and end with 'Conclusion'.\n"
|
| 31 |
+
|
| 32 |
+
"2. GROUP THEORY: To prove a subgroup H is normal, you must show gH = Hg for all g in G. "
|
| 33 |
+
"If the index [G:H]=2, use the partition G = H U (G-H) to show left and right cosets are identical.\n"
|
| 34 |
+
|
| 35 |
+
"3. NUMBER THEORY: For divisibility (e.g., n^k - n), use Fermat's Little Theorem or Induction. "
|
| 36 |
+
"For congruences ax ≡ b (mod n), always calculate d = gcd(a, n) first. If d does not divide b, state 'No Solution'.\n"
|
| 37 |
+
|
| 38 |
+
"4. REAL ANALYSIS: For limits, use the epsilon-delta or epsilon-N definition. "
|
| 39 |
+
"For convergence, state which test you are using (Ratio, Root, or Comparison).\n"
|
| 40 |
+
|
| 41 |
+
"5. COMPLEX ANALYSIS: To check differentiability, verify Cauchy-Riemann equations (ux = vy and uy = -vx). "
|
| 42 |
+
"For integrals, identify poles and use the Residue Theorem.\n"
|
| 43 |
+
|
| 44 |
+
"6. FORMATTING: Use LaTeX for EVERY mathematical symbol. Use '$$' for centered equations and '$' for inline math. "
|
| 45 |
+
"Never say 'it is obvious'; explain every logical jump."
|
| 46 |
+
)
|
| 47 |
)
|
| 48 |
|
| 49 |
user_query = st.chat_input("Enter your problem...")
|