Tazin commited on
Commit
e4928ff
·
1 Parent(s): 4bc9f0d

model, interface, example added

Browse files
Files changed (2) hide show
  1. app.py +8 -8
  2. requirements.txt +87 -0
app.py CHANGED
@@ -2,9 +2,9 @@ from fastai.vision.all import *
2
  from fastai.vision.all import load_learner
3
  import gradio as gr
4
 
5
- # import pathlib
6
- # temp = pathlib.PosixPath
7
- # pathlib.PosixPath = pathlib.WindowsPath
8
 
9
  #!export
10
  pollutant_labels = (
@@ -29,11 +29,11 @@ def recognize_image(image):
29
  image = gr.inputs.Image(shape=(256,256))
30
  label = gr.outputs.Label()
31
  examples = [
32
- 'unknown_00.jpg',
33
- 'unknown_01.jpg',
34
- 'unknown_02.jpg',
35
- 'unknown_03.jpg',
36
- 'unknown_04.jpg'
37
  ]
38
 
39
  iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
 
2
  from fastai.vision.all import load_learner
3
  import gradio as gr
4
 
5
+ import pathlib
6
+ temp = pathlib.PosixPath
7
+ pathlib.PosixPath = pathlib.WindowsPath
8
 
9
  #!export
10
  pollutant_labels = (
 
29
  image = gr.inputs.Image(shape=(256,256))
30
  label = gr.outputs.Label()
31
  examples = [
32
+ 'test_images/unknown_00.jpg',
33
+ 'test_images/unknown_01.jpg',
34
+ 'test_images/unknown_02.jpg',
35
+ 'test_images/unknown_03.jpg',
36
+ 'test_images/unknown_04.jpg'
37
  ]
38
 
39
  iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
requirements.txt ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==22.1.0
2
+ aiohttp==3.8.3
3
+ aiosignal==1.3.1
4
+ altair==4.2.0
5
+ anyio==3.6.2
6
+ async-timeout==4.0.2
7
+ attrs==22.2.0
8
+ blis==0.7.9
9
+ catalogue==2.0.8
10
+ certifi==2022.12.7
11
+ charset-normalizer==2.1.1
12
+ click==8.1.3
13
+ colorama==0.4.6
14
+ confection==0.0.4
15
+ contourpy==1.0.7
16
+ cycler==0.11.0
17
+ cymem==2.0.7
18
+ entrypoints==0.4
19
+ fastai==2.7.10
20
+ fastapi==0.89.1
21
+ fastcore==1.5.27
22
+ fastdownload==0.0.7
23
+ fastprogress==1.0.3
24
+ ffmpy==0.3.0
25
+ fonttools==4.38.0
26
+ frozenlist==1.3.3
27
+ fsspec==2022.11.0
28
+ gradio==3.16.2
29
+ h11==0.14.0
30
+ httpcore==0.16.3
31
+ httpx==0.23.3
32
+ idna==3.4
33
+ Jinja2==3.1.2
34
+ joblib==1.2.0
35
+ jsonschema==4.17.3
36
+ kiwisolver==1.4.4
37
+ langcodes==3.3.0
38
+ linkify-it-py==1.0.3
39
+ markdown-it-py==2.1.0
40
+ MarkupSafe==2.1.1
41
+ matplotlib==3.6.3
42
+ mdit-py-plugins==0.3.3
43
+ mdurl==0.1.2
44
+ multidict==6.0.4
45
+ murmurhash==1.0.9
46
+ numpy==1.24.1
47
+ orjson==3.8.5
48
+ packaging==23.0
49
+ pandas==1.5.2
50
+ pathy==0.10.1
51
+ Pillow==9.4.0
52
+ preshed==3.0.8
53
+ pycryptodome==3.16.0
54
+ pydantic==1.10.4
55
+ pydub==0.25.1
56
+ pyparsing==3.0.9
57
+ pyrsistent==0.19.3
58
+ python-dateutil==2.8.2
59
+ python-multipart==0.0.5
60
+ pytz==2022.7.1
61
+ PyYAML==6.0
62
+ requests==2.28.2
63
+ rfc3986==1.5.0
64
+ scikit-learn==1.2.0
65
+ scipy==1.10.0
66
+ six==1.16.0
67
+ smart-open==6.3.0
68
+ sniffio==1.3.0
69
+ spacy==3.4.4
70
+ spacy-legacy==3.0.11
71
+ spacy-loggers==1.0.4
72
+ srsly==2.4.5
73
+ starlette==0.22.0
74
+ thinc==8.1.7
75
+ threadpoolctl==3.1.0
76
+ toolz==0.12.0
77
+ torch==1.13.1
78
+ torchvision==0.14.1
79
+ tqdm==4.64.1
80
+ typer==0.7.0
81
+ typing_extensions==4.4.0
82
+ uc-micro-py==1.0.1
83
+ urllib3==1.26.14
84
+ uvicorn==0.20.0
85
+ wasabi==0.10.1
86
+ websockets==10.4
87
+ yarl==1.8.2