File size: 1,269 Bytes
22872f2
 
 
 
 
 
 
 
 
 
 
c33bcd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b49bedc
 
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
---
title: Test
emoji: 
colorFrom: indigo
colorTo: gray
sdk: gradio
sdk_version: 6.5.1
app_file: app.py
pinned: false
---

# 🔍 Medical Document Search using sentence-transformers/embeddinggemma-300m-medical

A search tool specialized in the medical field to helps you find relevant information across your medical documents.

## How It Works

1. **Enter your question** in the reference sentence box (e.g., "Is Mr. Allen eligible for enrollment given his type 2 diabetes?")
2. **Add documents** to search through in the comparison sentence boxes
3. **Click "Calculate Similarity"** to see ranked results
4. **Review the scores**: 
   - 🟢 Green (≥0.70): High similarity - very relevant
   - 🟠 Orange (0.50-0.69): Medium similarity - somewhat relevant
   - 🟣 Purple (<0.50): Lower similarity - less relevant

## Installation
```bash
pip install -r requirements.txt
```

## Setup

1. Get a Hugging Face API token from [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
2. Create a `.env` file in the project directory:
```
   HF_TOKEN=your_token_here
```
3. Run the application:
```bash
   python main.py
```

## Notes 
Note that for efficiency purposes, a template of the interface code and the css code was generate with an LLM.