Spaces:
Runtime error
Runtime error
arjunanand13
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -118,10 +118,41 @@ class Chatbot:
|
|
118 |
EXAMPLES = ["TDA4 product planning and datasheet release progress? ",
|
119 |
"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?",
|
120 |
"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."]
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
123 |
demo.launch()
|
124 |
|
125 |
# Instantiate and launch the chatbot
|
126 |
chatbot = Chatbot()
|
127 |
chatbot.launch_interface()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
EXAMPLES = ["TDA4 product planning and datasheet release progress? ",
|
119 |
"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?",
|
120 |
"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."]
|
121 |
+
dropdown = gr.Dropdown(label="Sample queries", choices=EXAMPLES)
|
122 |
+
|
123 |
+
tab1 = gr.Interface(fn=self.qa_infer, inputs=[gr.Textbox(label="QUERY", placeholder ="Enter your query here")], allow_flagging='never', examples=EXAMPLES, cache_examples=False, outputs=[gr.Textbox(label="SOLUTION"), gr.Textbox(label="RELATED QUERIES"), gr.HTML()], css=css_code)
|
124 |
+
tab2 = gr.Interface(fn=self.qa_infer, inputs=[dropdown], allow_flagging='never', outputs=[gr.Textbox(label="SOLUTION"), gr.Textbox(label="RELATED QUERIES"), gr.HTML()], css=css_code, title="Dropdown Input")
|
125 |
+
|
126 |
+
tabbed_interface = gr.Interface([tab1, tab2],["Textbox Input", "Dropdown Input"],title="TI E2E FORUM",theme="compact")
|
127 |
demo.launch()
|
128 |
|
129 |
# Instantiate and launch the chatbot
|
130 |
chatbot = Chatbot()
|
131 |
chatbot.launch_interface()
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
# def launch_interface(self):
|
136 |
+
# css_code = """
|
137 |
+
# .gradio-container {
|
138 |
+
# background-color: #daccdb;
|
139 |
+
# }
|
140 |
+
|
141 |
+
# /* Button styling for all buttons */
|
142 |
+
# button {
|
143 |
+
# background-color: #927fc7; /* Default color for all other buttons */
|
144 |
+
# color: black;
|
145 |
+
# border: 1px solid black;
|
146 |
+
# padding: 10px;
|
147 |
+
# margin-right: 10px;
|
148 |
+
# font-size: 16px; /* Increase font size */
|
149 |
+
# font-weight: bold; /* Make text bold */
|
150 |
+
# }
|
151 |
+
|
152 |
+
# """
|
153 |
+
# EXAMPLES = ["TDA4 product planning and datasheet release progress? ",
|
154 |
+
# "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?",
|
155 |
+
# "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."]
|
156 |
+
|
157 |
+
# demo = gr.Interface(fn=self.qa_infer, inputs=[gr.Textbox(label="QUERY", placeholder ="Enter your query here")], allow_flagging='never', examples=EXAMPLES, cache_examples=False, outputs=[gr.Textbox(label="SOLUTION"), gr.Textbox(label="RELATED QUERIES"), gr.HTML()], css=css_code)
|
158 |
+
# demo.launch()
|