Spaces:
Running
Running
Commit
·
f66a862
1
Parent(s):
5d9e8aa
fix: Gradio examples format for additional_inputs
Browse filesChatInterface with additional_inputs requires nested list format
where each example includes values for all inputs.
Before: ['question1', 'question2', ...]
After: [['question1', 'simple'], ['question2', 'simple'], ...]
- src/app.py +4 -4
src/app.py
CHANGED
|
@@ -150,10 +150,10 @@ def create_demo() -> Any:
|
|
| 150 |
type="messages", # type: ignore
|
| 151 |
title="",
|
| 152 |
examples=[
|
| 153 |
-
"What drugs could be repurposed for Alzheimer's disease?",
|
| 154 |
-
"Is metformin effective for treating cancer?",
|
| 155 |
-
"What medications show promise for Long COVID treatment?",
|
| 156 |
-
"Can statins be repurposed for neurological conditions?",
|
| 157 |
],
|
| 158 |
additional_inputs=[
|
| 159 |
gr.Radio(
|
|
|
|
| 150 |
type="messages", # type: ignore
|
| 151 |
title="",
|
| 152 |
examples=[
|
| 153 |
+
["What drugs could be repurposed for Alzheimer's disease?", "simple"],
|
| 154 |
+
["Is metformin effective for treating cancer?", "simple"],
|
| 155 |
+
["What medications show promise for Long COVID treatment?", "simple"],
|
| 156 |
+
["Can statins be repurposed for neurological conditions?", "simple"],
|
| 157 |
],
|
| 158 |
additional_inputs=[
|
| 159 |
gr.Radio(
|