Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,6 @@ with gr.Blocks() as app:
|
|
| 35 |
method_choice = gr.Radio(["Regular RAG", "Graph-RAG"], label="Select Method")
|
| 36 |
get_answer_btn = gr.Button("Get Answer")
|
| 37 |
answer_output = gr.Textbox(label="Answer")
|
| 38 |
-
image_output = gr.Gallery(label="Relevant Images", show_label=True)
|
| 39 |
graph_output = gr.Plot(label="Knowledge Graph Visualization")
|
| 40 |
ask_another_question_btn = gr.Button("Ask Another Question")
|
| 41 |
change_patient_btn = gr.Button("Set Another Patient")
|
|
@@ -53,7 +52,6 @@ with gr.Blocks() as app:
|
|
| 53 |
patient_input,
|
| 54 |
question_input,
|
| 55 |
answer_output,
|
| 56 |
-
image_output,
|
| 57 |
graph_output,
|
| 58 |
ask_another_question_btn,
|
| 59 |
change_patient_btn
|
|
@@ -63,12 +61,12 @@ with gr.Blocks() as app:
|
|
| 63 |
get_answer_btn.click(
|
| 64 |
qa_tool,
|
| 65 |
inputs=[question_input, method_choice],
|
| 66 |
-
outputs=[answer_output,
|
| 67 |
)
|
| 68 |
|
| 69 |
ask_another_question_btn.click(
|
| 70 |
ask_another_question,
|
| 71 |
-
outputs=[question_input, answer_output,
|
| 72 |
)
|
| 73 |
|
| 74 |
change_patient_btn.click(
|
|
@@ -81,11 +79,11 @@ with gr.Blocks() as app:
|
|
| 81 |
change_patient_btn,
|
| 82 |
question_input,
|
| 83 |
answer_output,
|
| 84 |
-
image_output,
|
| 85 |
graph_output
|
| 86 |
]
|
| 87 |
)
|
| 88 |
|
|
|
|
| 89 |
if __name__ == "__main__":
|
| 90 |
logger.info("Starting the application")
|
| 91 |
app.launch()
|
|
|
|
| 35 |
method_choice = gr.Radio(["Regular RAG", "Graph-RAG"], label="Select Method")
|
| 36 |
get_answer_btn = gr.Button("Get Answer")
|
| 37 |
answer_output = gr.Textbox(label="Answer")
|
|
|
|
| 38 |
graph_output = gr.Plot(label="Knowledge Graph Visualization")
|
| 39 |
ask_another_question_btn = gr.Button("Ask Another Question")
|
| 40 |
change_patient_btn = gr.Button("Set Another Patient")
|
|
|
|
| 52 |
patient_input,
|
| 53 |
question_input,
|
| 54 |
answer_output,
|
|
|
|
| 55 |
graph_output,
|
| 56 |
ask_another_question_btn,
|
| 57 |
change_patient_btn
|
|
|
|
| 61 |
get_answer_btn.click(
|
| 62 |
qa_tool,
|
| 63 |
inputs=[question_input, method_choice],
|
| 64 |
+
outputs=[answer_output, ask_another_question_btn, change_patient_btn, graph_output]
|
| 65 |
)
|
| 66 |
|
| 67 |
ask_another_question_btn.click(
|
| 68 |
ask_another_question,
|
| 69 |
+
outputs=[question_input, answer_output, graph_output, get_answer_btn, ask_another_question_btn]
|
| 70 |
)
|
| 71 |
|
| 72 |
change_patient_btn.click(
|
|
|
|
| 79 |
change_patient_btn,
|
| 80 |
question_input,
|
| 81 |
answer_output,
|
|
|
|
| 82 |
graph_output
|
| 83 |
]
|
| 84 |
)
|
| 85 |
|
| 86 |
+
|
| 87 |
if __name__ == "__main__":
|
| 88 |
logger.info("Starting the application")
|
| 89 |
app.launch()
|