Spaces:
Running
on
Zero
Running
on
Zero
Daemontatox
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ from transformers import (
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
-
MODEL_ID = "
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
@@ -30,46 +30,14 @@ MODEL_ID = "internlm/internlm3-8b-instruct"
|
|
30 |
# [Respond]: Present a well-structured and transparent answer, enriched with supporting details as needed.
|
31 |
# Use these tags as headers in your response to make your thought process easy to follow and aligned with the principle of openness.
|
32 |
|
33 |
-
DEFAULT_SYSTEM_PROMPT = """
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
2-<Break Down the Question>: Break down the question into more specific sub-questions.
|
41 |
-
|
42 |
-
3-<Identify Key Elements>: Identify important points and potential sub-questions.
|
43 |
-
|
44 |
-
4-<Formulate a Hypothesis>: Propose a preliminary idea based on your understanding.
|
45 |
-
|
46 |
-
5-<Gather Evidence>: Verify information from your knowledge base.
|
47 |
-
|
48 |
-
6-<Analyze Consequences>: Consider the potential consequences of your response.
|
49 |
-
|
50 |
-
7-<Question Your Hypotheses>: Consider alternative perspectives to your initial hypothesis.
|
51 |
-
|
52 |
-
8-<Consider Alternative Scenarios>: Think of innovative solutions or alternative scenarios to solve the problem posed.
|
53 |
-
|
54 |
-
9-<Use Analogies and Metaphors>: Illustrate your points with analogies and metaphors to make the explanation more intuitive.
|
55 |
-
|
56 |
-
10-<Provide Real Examples and Case Studies>: Use concrete examples and case studies to make the response more concrete.
|
57 |
-
|
58 |
-
11-<Acknowledge Limitations>: Recognize the limits of your knowledge and indicate when you cannot provide an accurate response.
|
59 |
-
|
60 |
-
12-<Use an Engaging and Accessible Tone>: Use an engaging tone and accessible language to make the response more enjoyable to read and understand.
|
61 |
-
|
62 |
-
13-<Explain Your Responses>: Clearly explain your responses to reinforce transparency and user trust.
|
63 |
-
|
64 |
-
14-<Cite Sources>: If possible, cite reliable sources from your knowledge base to support your assertions.
|
65 |
-
|
66 |
-
15-<Refine Your Response>: Clarify your thoughts and improve your reasoning.
|
67 |
-
|
68 |
-
16-<Review Your Response>: Read through to ensure it is clear, concise, and error-free.
|
69 |
-
|
70 |
-
Then provide the final response.
|
71 |
|
72 |
-
<Final Answer> --> {{answer}}
|
73 |
"""
|
74 |
# UI Configuration
|
75 |
TITLE = "<h1><center>AI Reasoning Assistant</center></h1>"
|
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
+
MODEL_ID = "unsloth/phi-4"
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
|
|
30 |
# [Respond]: Present a well-structured and transparent answer, enriched with supporting details as needed.
|
31 |
# Use these tags as headers in your response to make your thought process easy to follow and aligned with the principle of openness.
|
32 |
|
33 |
+
DEFAULT_SYSTEM_PROMPT = """
|
34 |
+
Understand]: Analyze the question to identify key details and clarify the goal.
|
35 |
+
# [Plan]: Outline a logical, step-by-step approach to address the question or problem.
|
36 |
+
# [Reason]: Execute the plan, applying logical reasoning, calculations, or analysis to reach a conclusion. Document each step clearly.
|
37 |
+
# [Reflect]: Review the reasoning and the final answer to ensure it is accurate, complete, and adheres to the principle of openness.
|
38 |
+
# [Respond]: Present a well-structured and transparent answer, enriched with supporting details as needed.
|
39 |
+
# Use these tags as headers in your response to make your thought process easy to follow and aligned with the principle of openness.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
|
|
41 |
"""
|
42 |
# UI Configuration
|
43 |
TITLE = "<h1><center>AI Reasoning Assistant</center></h1>"
|