Download locustfile.py from Nexscribe/NexScribe: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/spaces/Nexscribe/NexScribe/resolve/main/locustfile.py
- Command line
-
hf download hf://spaces/Nexscribe/NexScribe/locustfile.py
-
curl -L -o locustfile.py https://huggingface.co/spaces/Nexscribe/NexScribe/resolve/main/locustfile.py
1.27 kB
| from locust import HttpUser, task, between | |
| import random | |
| TRANSCRIPTS = [ | |
| """Patient is a 42-year-old male presenting with burning chest discomfort and reflux after meals for 5 days. | |
| Symptoms worsen when lying down and after spicy food. Reports sour taste in mouth and mild nausea. | |
| Denies shortness of breath, radiation to arm, vomiting, hematemesis, melena, or syncope. | |
| History of GERD. Has not been taking omeprazole consistently.""", | |
| """Patient reports epigastric pain, nausea, and bloating for 3 days. Pain worsens after meals. | |
| No vomiting, no fever, no melena, and no hematemesis. Occasional acid reflux symptoms are present.""", | |
| """Patient has intermittent abdominal discomfort and reflux after coffee and spicy meals. | |
| Symptoms improve slightly with antacids. Denies dysphagia, weight loss, and GI bleeding.""", | |
| """Patient reports worsening heartburn, regurgitation, and throat irritation for one week. | |
| Symptoms are worse when lying flat at night. Prior history of GERD and inconsistent PPI use.""" | |
| ] | |
| class NexScribeUser(HttpUser): | |
| wait_time = between(1, 3) | |
| def submit_transcript(self): | |
| transcript = random.choice(TRANSCRIPTS) | |
| self.client.post("/run/predict", json={ | |
| "data": [transcript] | |
| }) | |