DmitriiKhizbullin commited on
Commit
6d2185b
1 Parent(s): f036ad4

Instructions to run the app

Browse files
Files changed (3) hide show
  1. README.md +17 -2
  2. app.py +1 -1
  3. requirements.txt +72 -0
README.md CHANGED
@@ -4,7 +4,22 @@
4
 
5
  ### Gradio app environment
6
 
7
- TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  ### Training environment
10
 
@@ -27,4 +42,4 @@ Launch training:
27
  conda activate retinopathy_train
28
  python train.py
29
  ```
30
- The trained model will be put into `lightning_logs/`.
 
4
 
5
  ### Gradio app environment
6
 
7
+ Install from pip requirements file:
8
+
9
+ ```bash
10
+ conda create -n retinopathy_app python=3.10
11
+ conda activate retinopathy_app
12
+ pip install -r requirements.txt
13
+ python app.py
14
+ ```
15
+
16
+ Install manually:
17
+
18
+ ```bash
19
+ pip install pytorch --index-url https://download.pytorch.org/whl/cpu
20
+ pip install gradio
21
+ pip install transformers
22
+ ```
23
 
24
  ### Training environment
25
 
 
42
  conda activate retinopathy_train
43
  python train.py
44
  ```
45
+ The trained model will be put into `lightning_logs/`.
app.py CHANGED
@@ -44,7 +44,7 @@ class App:
44
  output = gr.Label(num_top_classes=len(DR_LABELMAP),
45
  label="Retinopathy level prediction")
46
  with gr.Column(scale=4):
47
- gr.Markdown("![](https://media.githubusercontent.com/media/Obs01ete/retinopathy/master/media/logo1.png)")
48
  with gr.Row():
49
  with gr.Column(scale=9, min_width=100):
50
  image = gr.Image(label="Retina scan")
 
44
  output = gr.Label(num_top_classes=len(DR_LABELMAP),
45
  label="Retinopathy level prediction")
46
  with gr.Column(scale=4):
47
+ gr.Markdown("![](https://media.githubusercontent.com/media/SDAIA-KAUST-AI/diabetic-retinopathy-detection/main/media/logo1.png)")
48
  with gr.Row():
49
  with gr.Column(scale=9, min_width=100):
50
  image = gr.Image(label="Retina scan")
requirements.txt CHANGED
@@ -1,2 +1,74 @@
1
  --extra-index-url https://download.pytorch.org/whl/cpu
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  torch==2.1.2+cpu
 
 
 
 
 
 
 
 
 
1
  --extra-index-url https://download.pytorch.org/whl/cpu
2
+ aiofiles==23.2.1
3
+ altair==5.2.0
4
+ annotated-types==0.6.0
5
+ anyio==4.2.0
6
+ attrs==23.2.0
7
+ certifi==2023.11.17
8
+ charset-normalizer==3.3.2
9
+ click==8.1.7
10
+ colorama==0.4.6
11
+ contourpy==1.2.0
12
+ cycler==0.12.1
13
+ exceptiongroup==1.2.0
14
+ fastapi==0.108.0
15
+ ffmpy==0.3.1
16
+ filelock==3.13.1
17
+ fonttools==4.47.0
18
+ fsspec==2023.12.2
19
+ gradio==4.13.0
20
+ gradio_client==0.8.0
21
+ h11==0.14.0
22
+ httpcore==1.0.2
23
+ httpx==0.26.0
24
+ huggingface-hub==0.20.2
25
+ idna==3.6
26
+ importlib-resources==6.1.1
27
+ Jinja2==3.1.2
28
+ jsonschema==4.20.0
29
+ jsonschema-specifications==2023.12.1
30
+ kiwisolver==1.4.5
31
+ markdown-it-py==3.0.0
32
+ MarkupSafe==2.1.3
33
+ matplotlib==3.8.2
34
+ mdurl==0.1.2
35
+ mpmath==1.3.0
36
+ networkx==3.2.1
37
+ numpy==1.26.3
38
+ orjson==3.9.10
39
+ packaging==23.2
40
+ pandas==2.1.4
41
+ pillow==10.2.0
42
+ pydantic==2.5.3
43
+ pydantic_core==2.14.6
44
+ pydub==0.25.1
45
+ Pygments==2.17.2
46
+ pyparsing==3.1.1
47
+ python-dateutil==2.8.2
48
+ python-multipart==0.0.6
49
+ pytz==2023.3.post1
50
+ PyYAML==6.0.1
51
+ referencing==0.32.1
52
+ regex==2023.12.25
53
+ requests==2.31.0
54
+ rich==13.7.0
55
+ rpds-py==0.16.2
56
+ safetensors==0.4.1
57
+ semantic-version==2.10.0
58
+ shellingham==1.5.4
59
+ six==1.16.0
60
+ sniffio==1.3.0
61
+ starlette==0.32.0.post1
62
+ sympy==1.12
63
+ tokenizers==0.15.0
64
+ tomlkit==0.12.0
65
+ toolz==0.12.0
66
  torch==2.1.2+cpu
67
+ tqdm==4.66.1
68
+ transformers==4.36.2
69
+ typer==0.9.0
70
+ typing_extensions==4.9.0
71
+ tzdata==2023.4
72
+ urllib3==2.1.0
73
+ uvicorn==0.25.0
74
+ websockets==11.0.3