Spaces:
Sleeping
Sleeping
Try add extra input box
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ function on_message(event) {
|
|
| 24 |
// Access the gradio elements through window.gradio
|
| 25 |
const projectData = event.data.projectData;
|
| 26 |
const question = event.data.question;
|
| 27 |
-
|
| 28 |
// Update the textboxes
|
| 29 |
document.querySelector('#project_data textarea').value = projectData;
|
| 30 |
document.querySelector('#output textarea').value = question;
|
|
@@ -41,9 +41,14 @@ with gr.Blocks(js=js) as demo:
|
|
| 41 |
value=state.context,
|
| 42 |
elem_id="project_data"
|
| 43 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
output = gr.Textbox(
|
| 45 |
label="Output",
|
| 46 |
-
value=state.question,
|
| 47 |
elem_id="output"
|
| 48 |
)
|
| 49 |
|
|
|
|
| 24 |
// Access the gradio elements through window.gradio
|
| 25 |
const projectData = event.data.projectData;
|
| 26 |
const question = event.data.question;
|
| 27 |
+
alert('test');
|
| 28 |
// Update the textboxes
|
| 29 |
document.querySelector('#project_data textarea').value = projectData;
|
| 30 |
document.querySelector('#output textarea').value = question;
|
|
|
|
| 41 |
value=state.context,
|
| 42 |
elem_id="project_data"
|
| 43 |
)
|
| 44 |
+
question = gr.Textbox(
|
| 45 |
+
label="Question",
|
| 46 |
+
lines=2,
|
| 47 |
+
value=state.question,
|
| 48 |
+
elem_id="question"
|
| 49 |
+
)
|
| 50 |
output = gr.Textbox(
|
| 51 |
label="Output",
|
|
|
|
| 52 |
elem_id="output"
|
| 53 |
)
|
| 54 |
|