Spaces:
Sleeping
Sleeping
geekyrakshit
commited on
Commit
·
aa14319
1
Parent(s):
3ee8144
add: medrag run command
Browse files- docs/app.md +5 -1
- medrag_multi_modal/cli.py +17 -0
- pyproject.toml +5 -0
docs/app.md
CHANGED
@@ -11,9 +11,13 @@ The MedQA Assistant App is a Streamlit-based application designed to provide a c
|
|
11 |
|
12 |
## Usage
|
13 |
|
|
|
|
|
|
|
|
|
14 |
1. **Launch the App**: Start the application using Streamlit:
|
15 |
```bash
|
16 |
-
|
17 |
```
|
18 |
2. **Configure Settings**: Adjust configuration settings in the sidebar to suit your needs.
|
19 |
3. **Ask a Question**: Enter your medical question in the chat input field.
|
|
|
11 |
|
12 |
## Usage
|
13 |
|
14 |
+
1. Install the package using:
|
15 |
+
```bash
|
16 |
+
uv pip install .
|
17 |
+
```
|
18 |
1. **Launch the App**: Start the application using Streamlit:
|
19 |
```bash
|
20 |
+
medrag run
|
21 |
```
|
22 |
2. **Configure Settings**: Adjust configuration settings in the sidebar to suit your needs.
|
23 |
3. **Ask a Question**: Enter your medical question in the chat input field.
|
medrag_multi_modal/cli.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import argparse
|
2 |
+
import subprocess
|
3 |
+
import sys
|
4 |
+
|
5 |
+
|
6 |
+
def main():
|
7 |
+
parser = argparse.ArgumentParser(description="MedRAG Multi-Modal CLI")
|
8 |
+
parser.add_argument("command", choices=["run"], help="Command to execute")
|
9 |
+
args = parser.parse_args()
|
10 |
+
|
11 |
+
if args.command == "run":
|
12 |
+
# Assuming your Streamlit app is in app.py
|
13 |
+
subprocess.run([sys.executable, "-m", "streamlit", "run", "app.py"])
|
14 |
+
|
15 |
+
|
16 |
+
if __name__ == "__main__":
|
17 |
+
main()
|
pyproject.toml
CHANGED
@@ -95,6 +95,11 @@ docs = [
|
|
95 |
"jupyter>=1.1.1",
|
96 |
]
|
97 |
|
|
|
|
|
98 |
|
99 |
[tool.pytest.ini_options]
|
100 |
pythonpath = "."
|
|
|
|
|
|
|
|
95 |
"jupyter>=1.1.1",
|
96 |
]
|
97 |
|
98 |
+
[project.scripts]
|
99 |
+
medrag = "medrag_multi_modal.cli:main"
|
100 |
|
101 |
[tool.pytest.ini_options]
|
102 |
pythonpath = "."
|
103 |
+
|
104 |
+
[tool.setuptools]
|
105 |
+
py-modules = ["medrag_multi_modal"]
|