arjunanand13 commited on
Commit
2477cb2
1 Parent(s): a176cea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -26
app.py CHANGED
@@ -87,35 +87,55 @@ def format_prompt(query):
87
  Include a brief final answer without additional comments, sign-offs, or extra phrases. Be direct and to the point.
88
 
89
  Example 1:
90
- '''
91
- {
92
- "question": "How to use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM",
93
- "answer": "To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from \"A15_0\" to \"IPU1_0\".",
94
- "related_questions": [
95
- {
96
- "question": "Can you provide MLBP documentation on TDA2?",
97
- "answer": "MLB is documented for DRA devices in the TRM book, chapter 24.12."
98
- },
99
- {
100
- "question": "Hi, could you share me the TDA2x documents about Security(SPRUHS7) and Cryptographic(SPRUHS8) addendums?",
101
- "answer": "Most of TDA2 documents are on ti.com under the product folder."
102
- },
103
- {
104
- "question": "Is any one can provide us a way to access CDDS for nessary docs?",
105
- "answer": "Which document are you looking for?"
106
- },
107
- {
108
- "question": "What can you tell me about the TDA2 and TDA3 processors? Can they / do they run Linux?",
109
- "answer": "We have moved your post to the appropriate forum."
110
- }
111
- ]
112
- }
113
-
114
- Final Answer:To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from "A15_0" to "IPU1_0".
115
- '''
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  """
 
 
117
  return prompt
118
 
 
119
  def qa_infer(query):
120
  formatted_prompt = format_prompt(query)
121
  result = chain({"question": formatted_prompt, "chat_history": chat_history})
 
87
  Include a brief final answer without additional comments, sign-offs, or extra phrases. Be direct and to the point.
88
 
89
  Example 1:
90
+ {{
91
+ "question": "How to use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM",
92
+ "answer": "To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from 'A15_0' to 'IPU1_0'.",
93
+ "related_questions": [
94
+ {{
95
+ "question": "Can you provide MLBP documentation on TDA2?",
96
+ "answer": "MLB is documented for DRA devices in the TRM book, chapter 24.12."
97
+ }},
98
+ {{
99
+ "question": "Hi, could you share me the TDA2x documents about Security(SPRUHS7) and Cryptographic(SPRUHS8) addendums?",
100
+ "answer": "Most of TDA2 documents are on ti.com under the product folder."
101
+ }},
102
+ {{
103
+ "question": "Is any one can provide us a way to access CDDS for nessary docs?",
104
+ "answer": "Which document are you looking for?"
105
+ }},
106
+ {{
107
+ "question": "What can you tell me about the TDA2 and TDA3 processors? Can they / do they run Linux?",
108
+ "answer": "We have moved your post to the appropriate forum."
109
+ }}
110
+ ]
111
+ }}
112
+
113
+ Final Answer: To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from 'A15_0' to 'IPU1_0'.
114
+
115
+ Example 2:
116
+ {{
117
+ "question": "Can BQ25896 support I2C interface?",
118
+ "answer": "Yes, the BQ25896 charger supports the I2C interface for communication.",
119
+ "related_questions": [
120
+ {{
121
+ "question": "What are the main features of BQ25896?",
122
+ "answer": "The BQ25896 features include high-efficiency, fast charging capability, and a wide input voltage range."
123
+ }},
124
+ {{
125
+ "question": "How to configure the BQ25896 for USB charging?",
126
+ "answer": "To configure the BQ25896 for USB charging, set the input current limit and the charging current via I2C registers."
127
+ }}
128
+ ]
129
+ }}
130
+
131
+ Final Answer: Yes, the BQ25896 charger supports the I2C interface for communication.
132
+
133
  """
134
+
135
+
136
  return prompt
137
 
138
+
139
  def qa_infer(query):
140
  formatted_prompt = format_prompt(query)
141
  result = chain({"question": formatted_prompt, "chat_history": chat_history})