Ferdinand Tom-Eshemogie commited on
Commit
586955d
·
1 Parent(s): 890bc9f

requirements for the env

Browse files
Files changed (3) hide show
  1. app.py +3 -1
  2. requirement.txt +2 -0
  3. requirements.txt +119 -0
app.py CHANGED
@@ -19,11 +19,13 @@ def classify_image(img):
19
  pred, pred_idx, probs = learner.predict(img)
20
 
21
  # Format the prediction and its probability as a string to show to the user
22
- return f"This is an Air Jordan {pred}; {(probs[pred_idx]* 100):.02f} accurate"
23
 
24
  # Create a Gradio interface
25
  # This part sets up the Gradio web interface, specifying the function to call for predictions,
26
  # the type of input it expects (an image), and the type of output (text).
 
 
27
  iface = gr.Interface(fn=classify_image,
28
  inputs=gr.Image(type='pil'), # Specifies that the input should be an image, automatically converted to PILImage
29
  outputs="text", # Specifies that the output is text (the prediction and probability)
 
19
  pred, pred_idx, probs = learner.predict(img)
20
 
21
  # Format the prediction and its probability as a string to show to the user
22
+ return f"This is an Air Jordan {pred}; {(probs[pred_idx]* 100):.02f}% accurate"
23
 
24
  # Create a Gradio interface
25
  # This part sets up the Gradio web interface, specifying the function to call for predictions,
26
  # the type of input it expects (an image), and the type of output (text).
27
+
28
+
29
  iface = gr.Interface(fn=classify_image,
30
  inputs=gr.Image(type='pil'), # Specifies that the input should be an image, automatically converted to PILImage
31
  outputs="text", # Specifies that the output is text (the prediction and probability)
requirement.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai>=2.5
2
+ gradio>=4.0
requirements.txt ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ altair==5.2.0
3
+ annotated-types==0.6.0
4
+ anyio==4.3.0
5
+ archspec @ file:///croot/archspec_1697725767277/work
6
+ attrs==23.2.0
7
+ blis==0.7.11
8
+ boltons @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/boltons_1699240838368/work
9
+ Brotli @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/brotli-split_1699237319520/work
10
+ catalogue==2.0.10
11
+ certifi @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_3bzbkiv4h_/croot/certifi_1707229182618/work/certifi
12
+ cffi @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_b4nang6w_y/croot/cffi_1700254307954/work
13
+ charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
14
+ click==8.1.7
15
+ cloudpathlib==0.16.0
16
+ colorama==0.4.6
17
+ conda @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_104cbbdti1/croot/conda_1708369123783/work
18
+ conda-content-trust @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/conda-content-trust_1699283351805/work
19
+ conda-libmamba-solver @ file:///croot/conda-libmamba-solver_1702997573971/work/src
20
+ conda-package-handling @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_3dblbw3die/croot/conda-package-handling_1700254361862/work
21
+ conda_package_streaming @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/conda-package-streaming_1699238858289/work
22
+ confection==0.1.4
23
+ contourpy==1.2.0
24
+ cryptography @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_b1p0q5vizk/croot/cryptography_1702070293829/work
25
+ cycler==0.12.1
26
+ cymem==2.0.8
27
+ distro @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/distro_1701803554172/work
28
+ fastai==2.7.14
29
+ fastapi==0.110.0
30
+ fastcore==1.5.29
31
+ fastdownload==0.0.7
32
+ fastprogress==1.0.3
33
+ ffmpy==0.3.2
34
+ filelock==3.13.1
35
+ fonttools==4.49.0
36
+ fsspec==2024.2.0
37
+ gradio==4.19.2
38
+ gradio_client==0.10.1
39
+ h11==0.14.0
40
+ httpcore==1.0.4
41
+ httpx==0.27.0
42
+ huggingface-hub==0.21.3
43
+ idna @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/idna_1699237644810/work
44
+ importlib_resources==6.1.2
45
+ Jinja2==3.1.3
46
+ joblib==1.3.2
47
+ jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work
48
+ jsonpointer==2.1
49
+ jsonschema==4.21.1
50
+ jsonschema-specifications==2023.12.1
51
+ kiwisolver==1.4.5
52
+ langcodes==3.3.0
53
+ libmambapy @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/mamba-split_1701805498280/work/libmambapy
54
+ markdown-it-py==3.0.0
55
+ MarkupSafe==2.1.5
56
+ matplotlib==3.8.3
57
+ mdurl==0.1.2
58
+ menuinst @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_26a7xsau78/croot/menuinst_1706732941263/work
59
+ mpmath==1.3.0
60
+ murmurhash==1.0.10
61
+ networkx==3.2.1
62
+ numpy==1.26.4
63
+ orjson==3.9.15
64
+ packaging @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/packaging_1699237023876/work
65
+ pandas==2.2.1
66
+ pillow==10.2.0
67
+ platformdirs @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/platformdirs_1701803010714/work
68
+ pluggy @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/pluggy_1699237243543/work
69
+ preshed==3.0.9
70
+ pycosat @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/pycosat_1699241479669/work
71
+ pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
72
+ pydantic==2.6.3
73
+ pydantic_core==2.16.3
74
+ pydub==0.25.1
75
+ Pygments==2.17.2
76
+ pyparsing==3.1.1
77
+ PySocks @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/pysocks_1699237568675/work
78
+ python-dateutil==2.9.0.post0
79
+ python-multipart==0.0.9
80
+ pytz==2024.1
81
+ PyYAML==6.0.1
82
+ referencing==0.33.0
83
+ requests @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_b3tnputioh/croot/requests_1707355573919/work
84
+ rich==13.7.1
85
+ rpds-py==0.18.0
86
+ ruamel.yaml @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/ruamel.yaml_1699241608430/work
87
+ ruff==0.3.0
88
+ scikit-learn==1.4.1.post1
89
+ scipy==1.12.0
90
+ semantic-version==2.10.0
91
+ setuptools==68.2.2
92
+ shellingham==1.5.4
93
+ six==1.16.0
94
+ smart-open==6.4.0
95
+ sniffio==1.3.1
96
+ spacy==3.7.4
97
+ spacy-legacy==3.0.12
98
+ spacy-loggers==1.0.5
99
+ srsly==2.4.8
100
+ starlette==0.36.3
101
+ sympy==1.12
102
+ thinc==8.2.3
103
+ threadpoolctl==3.3.0
104
+ tomlkit==0.12.0
105
+ toolz==0.12.1
106
+ torch==2.2.1
107
+ torchvision==0.17.1
108
+ tqdm @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/tqdm_1701805884490/work
109
+ truststore @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/truststore_1701805928787/work
110
+ typer==0.9.0
111
+ typing_extensions==4.10.0
112
+ tzdata==2024.1
113
+ urllib3 @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_aff2m3lasf/croot/urllib3_1707770561896/work
114
+ uvicorn==0.27.1
115
+ wasabi==1.1.2
116
+ weasel==0.3.4
117
+ websockets==11.0.3
118
+ wheel==0.41.2
119
+ zstandard @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/zstandard_1699238791645/work