Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -162,19 +162,26 @@ with gr.Blocks() as demo:
|
|
162 |
submit_button = gr.Button("Send")
|
163 |
clear_history_button = gr.Button("Clear Chat History")
|
164 |
|
|
|
|
|
165 |
with gr.Group():
|
166 |
gr.Markdown("### Example Applications")
|
167 |
gr.Examples(
|
168 |
-
|
169 |
["Industrial automation system requiring precise motion control and multiple sensor inputs"],
|
170 |
["Battery-powered IoT device with wireless connectivity and low power requirements"],
|
171 |
["High-performance motor control application with real-time processing needs"],
|
172 |
-
["Smart building management system with multiple environmental sensors"]
|
173 |
],
|
174 |
inputs=[question_input],
|
175 |
label="Example Applications"
|
176 |
)
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
178 |
def handle_question(question):
|
179 |
explanation, df = pdf_chat.answer_question(question)
|
180 |
return explanation, df, question
|
|
|
162 |
submit_button = gr.Button("Send")
|
163 |
clear_history_button = gr.Button("Clear Chat History")
|
164 |
|
165 |
+
pdf_path = "renesas-ra6m1-group-datasheet.pdf"
|
166 |
+
|
167 |
with gr.Group():
|
168 |
gr.Markdown("### Example Applications")
|
169 |
gr.Examples(
|
170 |
+
[
|
171 |
["Industrial automation system requiring precise motion control and multiple sensor inputs"],
|
172 |
["Battery-powered IoT device with wireless connectivity and low power requirements"],
|
173 |
["High-performance motor control application with real-time processing needs"],
|
174 |
+
["Smart building management system with multiple environmental sensors"]
|
175 |
],
|
176 |
inputs=[question_input],
|
177 |
label="Example Applications"
|
178 |
)
|
179 |
+
gr.Examples(
|
180 |
+
[[pdf_path]],
|
181 |
+
inputs=[pdf_input],
|
182 |
+
label="Example PDF"
|
183 |
+
)
|
184 |
+
|
185 |
def handle_question(question):
|
186 |
explanation, df = pdf_chat.answer_question(question)
|
187 |
return explanation, df, question
|