Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -180,11 +180,33 @@ def qa_infer(query):
|
|
| 180 |
# Return the content and answer along with the download link
|
| 181 |
download_link = f'<a href="file/{output_file}" download>Download Output File</a>'
|
| 182 |
return content, result['answer'], download_link
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
EXAMPLES = ["Can the SSC feature be enabled on DPLL_VIDEO1 using the PLL_SSC_CONFIGURATION1[EN_SSC] register to mitigate EMI issues on VOUT1?",
|
| 185 |
"I'm using Code Composer Studio 5.4.0.00091 and enabled FPv4SPD16 floating point support for CortexM4 in TDA2. However, after building the project, the .asm file shows --float_support=vfplib instead of FPv4SPD16. Why is this happening?",
|
| 186 |
"Master core in TDA2XX is a15 and in TDA3XX it is m4,so we have to shift all modules that are being used by a15 in TDA2XX to m4 in TDA3xx."]
|
| 187 |
|
| 188 |
-
demo = gr.Interface(fn=qa_infer, inputs=[gr.Textbox(label="QUERY", placeholder ="Enter your query here")], allow_flagging='never', examples=EXAMPLES, cache_examples=False, outputs=[gr.Textbox(label="RELATED QUERIES"), gr.Textbox(label="SOLUTION"), gr.HTML()])#,outputs="text")
|
| 189 |
demo.launch()
|
| 190 |
|
|
|
|
| 180 |
# Return the content and answer along with the download link
|
| 181 |
download_link = f'<a href="file/{output_file}" download>Download Output File</a>'
|
| 182 |
return content, result['answer'], download_link
|
| 183 |
+
|
| 184 |
+
css_code = """
|
| 185 |
+
.gradio-container {
|
| 186 |
+
background-color: #daccdb;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
/* Button styling for all buttons */
|
| 190 |
+
button {
|
| 191 |
+
background-color: #d6cbd6; /* Default color for all other buttons */
|
| 192 |
+
color: black;
|
| 193 |
+
border: 1px solid black;
|
| 194 |
+
padding: 10px;
|
| 195 |
+
margin-right: 10px;
|
| 196 |
+
font-size: 16px; /* Increase font size */
|
| 197 |
+
font-weight: bold; /* Make text bold */
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
/* Style for the second button */
|
| 201 |
+
button:nth-child(2) {
|
| 202 |
+
background-color: #927fc7;
|
| 203 |
+
color: black;
|
| 204 |
+
}
|
| 205 |
+
"""
|
| 206 |
EXAMPLES = ["Can the SSC feature be enabled on DPLL_VIDEO1 using the PLL_SSC_CONFIGURATION1[EN_SSC] register to mitigate EMI issues on VOUT1?",
|
| 207 |
"I'm using Code Composer Studio 5.4.0.00091 and enabled FPv4SPD16 floating point support for CortexM4 in TDA2. However, after building the project, the .asm file shows --float_support=vfplib instead of FPv4SPD16. Why is this happening?",
|
| 208 |
"Master core in TDA2XX is a15 and in TDA3XX it is m4,so we have to shift all modules that are being used by a15 in TDA2XX to m4 in TDA3xx."]
|
| 209 |
|
| 210 |
+
demo = gr.Interface(fn=qa_infer, inputs=[gr.Textbox(label="QUERY", placeholder ="Enter your query here")], allow_flagging='never', examples=EXAMPLES, cache_examples=False, outputs=[gr.Textbox(label="RELATED QUERIES"), gr.Textbox(label="SOLUTION"), gr.HTML()], css=css_code)#,outputs="text")
|
| 211 |
demo.launch()
|
| 212 |
|