Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from chatbot.chatbot import chatbot_response | |
| def respond(discharge_summary, risk_score, question): | |
| return chatbot_response( | |
| question=question, | |
| note=discharge_summary, | |
| risk_score=float(risk_score) | |
| ) | |
| demo = gr.Interface( | |
| fn=respond, | |
| inputs=[ | |
| gr.Textbox(label="Discharge Summary", lines=12), | |
| gr.Slider(0, 1, value=0.65, label="Predicted Readmission Risk"), | |
| gr.Textbox(label="Ask a question") | |
| ], | |
| outputs=gr.Textbox(label="Assistant Response"), | |
| title="Clinical Readmission Assistant" | |
| ) | |
| demo.launch(share=True) |