gpaasch commited on
Commit
1f22857
·
1 Parent(s): c0a6243

utilizing llama index can net an extra $1000 in winnings

Browse files
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 💬
4
  colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.32.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.33.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
docs/plans/timeline.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Here are the key dates for the Gradio Agents & MCP Hackathon you’ll want to keep on your radar:
2
+
3
+ * **May 20 – 26, 2025**: Pre-Hackathon announcements period ([huggingface.co][1])
4
+ * **June 2 – 10, 2025**: Official hackathon window (also the period during which sign-ups remain open) ([huggingface.co][1])
5
+ * **June 3, 2025 — 9 AM PST / 4 PM UTC**: Live kickoff YouTube event ([huggingface.co][1])
6
+ * **June 4 – 5, 2025**: Gradio Office Hours with MCP Support (Abubakar), MistralAI, LlamaIndex, Custom Components team, and Sambanova ([huggingface.co][1])
7
+ * **June 10, 2025 — 11:59 PM UTC**: Final submission deadline (last chance to push your Space and to join the org for sponsor credits) ([huggingface.co][1])
8
+ * **June 11 – 16, 2025**: Judging period ([huggingface.co][1])
9
+ * **June 17, 2025**: Winners announced ([huggingface.co][1])
10
+
11
+ [1]: https://huggingface.co/Agents-MCP-Hackathon "Agents-MCP-Hackathon (Agents-MCP-Hackathon)"
docs/plans/work_plan.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Focus on Track 1. Trying to build two full projects in four days will leave you with nothing polished. Here’s your kill-plan for Track 1:
2
+
3
+ 1. **Today (June 6):**
4
+
5
+ * Finalize your symptom→ICD mapping module and JSON output.
6
+ * Stand up a minimal Gradio/MCP endpoint locally.
7
+
8
+ 2. **June 7:**
9
+
10
+ * Wire up the front-end UI (Gradio space).
11
+ * Hook it into Sonova (or your local HuggingFace‐hosted model) and verify the API calls work.
12
+
13
+ 3. **June 8:**
14
+
15
+ * Write README + usage docs.
16
+ * Deploy your Space to HF.
17
+
18
+ 4. **June 9:**
19
+
20
+ * End-to-end testing with 5–10 real symptom examples.
21
+ * Polish prompts, confidence scores, and UI copy.
22
+
23
+ 5. **June 10 (morning):**
24
+
25
+ * Final sanity check, package, and submit before end of day.
26
+
27
+ Only if you finish these steps by end of Day 2 should you consider a tiny Track 2 add-on (e.g. a single custom slider). Otherwise nail Track 1.
requirements.txt CHANGED
@@ -1 +1,3 @@
1
- gradio[mcp]
 
 
 
1
+ gradio==3.53.1
2
+ llama-index==0.6.9
3
+ openai==0.27.0
utils/llama_index_utils.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # llama_index_utils.py
2
+ from llama_index import SimpleDirectoryReader, GPTVectorStoreIndex
3
+
4
+ _index = None
5
+
6
+ def build_index(data_path="data/icd10cm_tabular_2025"):
7
+ global _index
8
+ if _index is None:
9
+ docs = SimpleDirectoryReader(data_path).load_data()
10
+ _index = GPTVectorStoreIndex.from_documents(docs)
11
+ return _index
12
+
13
+ def query_symptoms(prompt: str, top_k: int = 5):
14
+ idx = build_index()
15
+ qe = idx.as_query_engine(similarity_top_k=top_k)
16
+ return qe.query(prompt)