Spaces:
Running
Running
File size: 2,853 Bytes
1bd8cdf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
* [x] Initialize new Hugging Face Space with Gradio SDK 5.x
* Add `mcp-server-track` tag in `README.md`
* [ ] Write Python function `symptom_to_diagnosis(symptom_text)`
* Use OpenAI or Anthropic API to generate JSON
* Format prompt to request JSON output
* Parse model response into Python dict
* Handle JSON formatting quirks (trim extra text, use `json.loads`)
* Implement fallback rule-based mapping for demo cases
* [ ] Test `symptom_to_diagnosis` function
* Input common symptom examples and combinations
* Verify relevance and correctness of ICD codes and diagnoses
* Tweak prompt to improve specificity and JSON validity
* [ ] Define confidence score methodology
* Decide whether to use model’s self-reported scores or rank order as proxy
* Document how confidence is calculated and interpreted
* [ ] Integrate function into Gradio Blocks interface
* Use `gr.Interface` or `gr.ChatInterface` to accept symptom text input and display JSON output
* Configure Gradio app metadata to expose MCP endpoint
* [ ] Build demonstration client or script (optional)
* Create minimal client using `gradio.Client` or `requests` to call Space’s prediction API
* Alternatively, build a second Gradio Space as a simple chatbot that calls the MCP tool
* Prepare screen recording showing AI agent (e.g., Claude Desktop) calling the MCP endpoint with example query
* [ ] Update `README.md` documentation
* Describe tool functionality and usage examples
* Include `mcp-server-track` tag, link to video or client demo
* List technologies used (e.g., “OpenAI GPT-4 API for symptom→ICD mapping”)
* [ ] Configure OpenAI/Anthropic API usage
* Use cheaper models (e.g., GPT-3.5) during development
* Reserve GPT-4 or Claude-2 for final demo queries to conserve credits
* [ ] Evaluate Hugging Face / Mistral credits for alternative inference
* Identify open ICD-10 prediction models on HF Inference API (e.g., `AkshatSurolia/ICD-10-Code-Prediction`)
* Consider running open-source models on Mistral if time allows
* [ ] Plan Modal Labs usage for cloud compute (optional)
* Pre-compute ICD-10 embeddings in Modal job if semantic search is added
* Host backend microservice or Gradio app on Modal if HF Space resources are insufficient
* [ ] Reserve Nebius or Hyperbolic Labs credits for GPU-intensive tasks (if needed)
* Spin up GPU instance to host or fine-tune open-source model only if HF Space times out
* [ ] Consider LlamaIndex integration for retrieval-augmented generation (bonus)
* Load ICD-10 dataset into LlamaIndex and test semantic search for candidate codes
* Implement minimal index of common diagnoses for demo if time permits
* [ ] Record and document final demo
* Capture symptom input, MCP tool invocation, and JSON output in a short video
* Host video link in `README.md`
|